node-printer icon indicating copy to clipboard operation
node-printer copied to clipboard

Error npm install printer

Open maranedaex opened this issue 8 years ago • 5 comments

C:\ORION_DESA\orion>npm install printer --msvs_version=2017

[email protected] install C:\ORION_DESA\orion\node_modules\printer node-gyp rebuild

C:\ORION_DESA\orion\node_modules\printer>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" reb uild ) Traceback (most recent call last): File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in sys.exit(gyp.script_main()) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 545, in script_main return main(sys.argv[1:]) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 538, in main return gyp_main(args) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 514, in gyp_main options.duplicate_basename_check) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 98, in Load generator.CalculateVariables(default_variables, params) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1900, in CalculateVariables generator_flags.get('msvs_version', 'auto')) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) KeyError: '2017' gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\ORION_DESA\orion\node_modules\printer gyp ERR! node -v v6.11.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules\7zip-bin\node_modules\7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.1.0 (node_modules\7zip-bin\node_modules\7zip-bin-linux): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none was installed. npm WARN [email protected] No repository field. npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "printer" "--msvs_version=2017" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the printer package,

Thanks MCA [email protected]

maranedaex avatar Oct 28 '17 02:10 maranedaex

Hello, I think you used mingw or under the mingw/bash terminal. Try the cmd or visual studio terminal.

tojocky avatar Oct 29 '17 08:10 tojocky

I am also facing same issue npm -v 5.0.0 node -v v8.0.0 window 10

npm install printer --msvs_version=2017

[email protected] install E:\code\pro\test\posrestro\app\node_modules\printer node-gyp rebuild

E:\code\pro\test\posrestro\app\node_modules\printer>if not defined npm_config_node_gyp (node "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Traceback (most recent call last): File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in sys.exit(gyp.script_main()) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 545, in script_main return main(sys.argv[1:]) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 538, in main return gyp_main(args) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 514, in gyp_main options.duplicate_basename_check) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 98, in Load generator.CalculateVariables(default_variables, params) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables generator_flags.get('msvs_version', 'auto')) File "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) KeyError: '2017' gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\win10\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd E:\code\pro\test\posrestro\app\node_modules\printer gyp ERR! node -v v8.0.0 gyp ERR! node-gyp -v v3.6.1 gyp ERR! not ok npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] 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 logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\win10\AppData\Roaming\npm-cache_logs\2018-02-04T08_17_36_164Z-debug.log


is 2017 version supported?

cashwanikumar avatar Feb 04 '18 08:02 cashwanikumar

+1

lishichao1002 avatar Sep 04 '18 08:09 lishichao1002

Hi, I have this problem during installation

npm ERR! code 1 npm ERR! path F:\Reza-Data\Printer\node_modules\printer npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm install node-gyp node-pre-gyp npm ERR! npm ERR! code ERESOLVE npm ERR! npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! npm ERR! npm ERR! While resolving: [email protected] npm ERR! npm ERR! Found: [email protected] npm ERR! npm ERR! node_modules/grunt npm ERR! npm ERR! dev grunt@"^1.0.4" from the root project npm ERR! npm ERR! npm ERR! npm ERR! Could not resolve dependency: npm ERR! npm ERR! peer grunt@"~0.4" from [email protected] npm ERR! npm ERR! node_modules/grunt-node-gyp npm ERR! npm ERR! dev grunt-node-gyp@"git://github.com/tojocky/grunt-node-gyp.git" from the root project npm ERR! npm ERR! npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! npm ERR! this command with --force, or --legacy-peer-deps npm ERR! npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! npm ERR! See C:\Users\Reza\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! npm ERR! C:\Users\Reza\AppData\Local\npm-cache\_logs\2021-06-13T11_19_01_823Z-debug.log

RezaSalaari avatar Jun 13 '21 11:06 RezaSalaari