Robotjs: Issue on installing RobotJs

Created on 6 Aug 2018  路  5Comments  路  Source: octalmage/robotjs

```
D:\projs\aaaa>npm -version
6.2.0

D:\projs\aaaa>node -v
v10.8.0

D:\projs\aaaa>node-gyp --version
v3.7.0

D:\projs\aaaa>npm i robotjs

[email protected] install D:\projs\aaaa\node_modules\canvas
node-gyp rebuild

D:\projs\aaaa\node_modules\canvas>if not defined npm_config_node_gyp (node "D:\P
rogram Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\..
..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\Program Fil
es\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgypgyp_m
ain.py", line 16, in
sys.exit(gyp.script_main())
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 538, in main
return gyp_main(args)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 2004, in GenerateOutput
generator_flags))
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 943, in _GenerateProject
return _GenerateMSVSProject(project, options, version, generator_flags)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 1047, in _GenerateMSVSProject
p.WriteIfChanged()
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\MSVSProject.py", line 208, in WriteIfChanged
encoding="Windows-1252")
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\easy_xml.py", line 122, in WriteXmlIfChanged
xml_string = xml_string.decode(default_encoding).encode(encoding)
File "C:\Python27\lib\encodings\cp1252.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 507-523:
character maps to
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (D:\Program Files\nodejs\node_module
s\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:238:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\projs\aaaa\node_modules\canvas
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok

[email protected] install D:\projs\aaaa\node_modules\robotjs
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.8.0 runtime=
node arch=x64 platform=win32)

D:\projs\aaaa\node_modules\robotjs>if not defined npm_config_node_gyp (node "D:\
Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\.
...\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\Program Fi
les\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgypgyp_m
ain.py", line 16, in
sys.exit(gyp.script_main())
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 538, in main
return gyp_main(args)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 2004, in GenerateOutput
generator_flags))
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 943, in _GenerateProject
return _GenerateMSVSProject(project, options, version, generator_flags)
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\generator\msvs.py", line 1047, in _GenerateMSVSProject
p.WriteIfChanged()
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\MSVSProject.py", line 208, in WriteIfChanged
encoding="Windows-1252")
File "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylib
gyp\easy_xml.py", line 122, in WriteXmlIfChanged
xml_string = xml_string.decode(default_encoding).encode(encoding)
File "C:\Python27\lib\encodings\cp1252.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 509-525:
character maps to
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (D:\Program Files\nodejs\node_module
s\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:238:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\projs\aaaa\node_modules\robotjs
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\canva
s):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\小褍锌械褉袛褍锌械褉袚芯胁薪懈褖械\AppData\Roaming\npm-cache_logs\2018-08-
06T06_43_54_448Z-debug.log

D:\projs\aaaa>```

What i have to do? Windows7 Ultimate

Most helpful comment

It is working for me on NodeJS 10.10.
My environment is Windows 7 64 bit + Node 10.10 + Latest RobotJS Version

Could you try to install windows-build-tools and then try?

All 5 comments

Same here - can't run on Node v10.8.0

have any of you figured out how to run it on node 10?

It is working for me on NodeJS 10.10.
My environment is Windows 7 64 bit + Node 10.10 + Latest RobotJS Version

Could you try to install windows-build-tools and then try?

Installing windows-build-tools is what did it for me, thanks!

This issue has been closed because it has been inactive for > 180 days.
You may reopen this issue if it has been closed in error.

Was this page helpful?
0 / 5 - 0 ratings