nodejs / node-gyp

Node.js native addon build tool
MIT License
9.86k stars 1.79k forks source link

求解,困扰好多天了 (It's been bothering me for days) #2503

Closed 1248142645 closed 2 years ago

1248142645 commented 2 years ago

E:\ProgramData\nodejs\node.exe E:\ProgramData\nodejs\node_modules\npm\bin\npm-cli.js install --scripts-prepend-node-path=auto npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated html-webpack-plugin@2.30.1: out of support npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated querystring@0.2.0: The npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by uglify-js as of v3.13.0 npm WARN deprecated bfj-node4@5.3.1: Switch to the bfj package for fixes and new features! npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3 410 npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your de pendencies to the actual version of core-js. npm ERR! code 7 npm ERR! path D:\project\other\mall-admin-web\node_modules\node-sass 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@3.8.0 npm ERR! gyp info using node@16.10.0 | win32 | x64 npm ERR! (node:1732) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! gyp info spawn C:\Python27\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'D:\project\other\mall-admin-web\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-G', npm ERR! gyp info spawn args 'msvs_version=2015', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'D:\project\other\mall-admin-web\node_modules\node-sass\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'D:\project\other\mall-admin-web\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\sky\.node-gyp\16.10.0\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\sky\.node-gyp\16.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=D:\project\other\mall-admin-web\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\Users\sky\.node-gyp\16.10.0\<(target_arch)\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\project\other\mall-admin-web\node_modules\node-sass', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'D:\project\other\mall-admin-web\node_modules\node-sass\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! UNCAUGHT EXCEPTION npm ERR! gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:477:16) npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21) npm ERR! gyp ERR! System Windows_NT 10.0.17763 npm ERR! gyp ERR! command "E:\ProgramData\nodejs\node.exe" "D:\project\other\mall-admin-web\node_modules\node-gyp\bin\node-gyp.js" "rebui ld" npm ERR! gyp ERR! cwd D:\project\other\mall-admin-web\node_modules\node-sass npm ERR! gyp ERR! node -v v16.10.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! This is a bug in node-gyp. npm ERR! gyp ERR! Try to update node-gyp and file an Issue if it does not help: npm ERR! gyp ERR! https://github.com/nodejs/node-gyp/issues

npm ERR! A complete log of this run can be found in: npm ERR! E:\ProgramData\nodejs\node_cache_logs\2021-09-24T02_31_30_708Z-debug.log

Process finished with exit code 7

cclauss commented 2 years ago

npm ERR! gyp info using node-gyp@3.8.0

https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md

1248142645 commented 2 years ago

npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your de pendencies to the actual version of core-js. npm ERR! code 1 npm ERR! path D:\project\other\eladmin-web\node_modules\deasync npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء� npm ERR! deasync.cc npm ERR! d:\project\other\eladmin-web\node_modules\deasync\src\deasync.cc(2): fatal error C1083: �޷�������ļ �: ��v8.h��: No such file o r directory [D:\project\other\eladmin-web\node_modules\deasync\build\deasync.vcxproj] npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@16.10.0 | win32 | x64 npm ERR! gyp info find Python using Python version 2.7.18 found at "C:\Python27\python.exe" npm ERR! gyp info find VS using VS2017 (15.9.28307.1440) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! (node:12716) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! gyp info spawn C:\Python27\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'E:\ProgramData\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'D:\project\other\eladmin-web\node_modules\deasync\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'E:\ProgramData\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\sky\AppData\Local\node-gyp\Cache\16.10.0\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\sky\AppData\Local\node-gyp\Cache\16.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=E:\ProgramData\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\sky\\AppData\\Local\\node-gyp\\Cache\\16.10.0\\<(target_arch)\\node.li b', npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\project\other\eladmin-web\node_modules\deasync', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'D:\project\other\eladmin-web\node_modules\deasync\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (E:\ProgramData\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) npm ERR! gyp ERR! System Windows_NT 10.0.17763 npm ERR! gyp ERR! command "E:\ProgramData\nodejs\node.exe" "E:\ProgramData\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js " "rebuild" npm ERR! gyp ERR! cwd D:\project\other\eladmin-web\node_modules\deasync npm ERR! gyp ERR! node -v v16.10.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! E:\ProgramData\nodejs\node_cache_logs\2021-09-24T08_31_19_586Z-debug.log

Process finished with exit code 1

cclauss commented 2 years ago

npm ERR! gyp info find Python using Python version 2.7.18 found at "C:\Python27\python.exe"

Python 2 died 632 days ago on 1/1/2020 so it is no longer supported by node-gyp as discussed at https://github.com/nodejs/node-gyp#installation