mathiask88 / node-snap7

node.js wrapper for snap7
MIT License
161 stars 59 forks source link

can not install node-snap7 #86

Closed gongjf1982 closed 2 years ago

gongjf1982 commented 2 years ago

PS D:\Snap7-learner> npm install npm ERR! code 1 npm ERR! path D:\Snap7-learner\node_modules\node-snap7 npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.3.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.9.7 found at "C:\ProgramData\Anaconda3\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) npm ERR! gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) npm ERR! gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 npm ERR! gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 npm ERR! gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) npm ERR! gyp ERR! System Windows_NT 10.0.19041 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Roaming\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd D:\Snap7-learner\node_modules\node-snap7 npm ERR! gyp ERR! node -v v16.13.1 npm ERR! gyp ERR! node-gyp -v v8.3.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2022-04-05T07_50_26_287Z-debug.log PS D:\Snap7-learner> webpack asset js/build.js 1.31 MiB [compared for emit] (name: main) asset favicon.ico 5.3 KiB [compared for emit] [from: favicon.ico] [copied] asset index.html 319 bytes [compared for emit] runtime modules 937 bytes 4 modules cacheable modules 1.15 MiB modules by path ./node_modules/ 1.15 MiB ./node_modules/_node-snap7@1.0.6@node-snap7/lib/node-snap7.js 2.12 KiB [built] [code generated] ./node_modules/_three@0.139.2@three/build/three.module.js 1.13 MiB [built] [code generated] ./node_modules/events/events.js 14.5 KiB [built] [code generated] ./node_modules/_bindings@1.5.0@bindings/bindings.js 5.85 KiB [built] [code generated] ./node_modules/_file-uri-to-path@1.0.0@file-uri-to-path/index.js 1.68 KiB [built] [code generated] modules by path ./src/ 157 bytes ./src/js/index.js 21 bytes [built] [code generated] ./src/ts/index.ts 136 bytes [built] [code generated]

ERROR in ./node_modules/_bindings@1.5.0@bindings/bindings.js 5:9-22 Module not found: Error: Can't resolve 'fs' in 'D:\Snap7-learner\node_modules_bindings@1.5.0@bindings' @ ./node_modules/_node-snap7@1.0.6@node-snap7/lib/node-snap7.js 8:25-44 @ ./src/ts/index.ts 3:0-36 5:12-17 @ ./src/js/index.js 1:0-21

ERROR in ./node_modules/_bindings@1.5.0@bindings/bindings.js 6:9-24 Module not found: Error: Can't resolve 'path' in 'D:\Snap7-learner\node_modules_bindings@1.5.0@bindings'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:

ERROR in ./node_modules/_file-uri-to-path@1.0.0@file-uri-to-path/index.js 6:10-29 Module not found: Error: Can't resolve 'path' in 'D:\Snap7-learner\node_modules_file-uri-to-path@1.0.0@file-uri-to-path'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:

3 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.71.0 compiled with 3 errors in 2567 ms PS D:\Snap7-learner>