当我安装web3@1.0.0-beta.26时,出现此错误“ node.lib:致命错误LNK1106:”

时间:2019-09-16 04:08:17

标签: npm visual-studio-2017 node-gyp web3

我已经cmd npm install --global --production windows-build-tools --vs2017并成功完成。但是,当我开始安装web3@1.0.0-beta.26时,会弹出错误C:\Users\ASUS\AppData\Local\node-gyp\Cache\12.10.0\x64\node.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x2E3938 [C:\Users\ASUS\Desktop\lottery_react\node_modules\sha3\build\sha3.vcxproj],现在我该怎么办?请帮忙!

我见过this,但是它没有特定的解决方案。还尝试了this,但我认为这与我的错误不同。另外,cmd npm config set msvs_version 2017

下面是我弹出的错误:

C:\Users\ASUS\Desktop\lottery_react>npm install --save web3@1.0.0-beta.26
npm WARN lifecycle The node binary used for scripts is C:\Program Files\nodejs\node.exe but npm is using C:\Users\ASUS\AppData\Roaming\npm\node_modules\node\bin\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> sha3@1.2.3 install C:\Users\ASUS\Desktop\lottery_react\node_modules\sha3
> node-gyp rebuild


C:\Users\ASUS\Desktop\lottery_react\node_modules\sha3>if not defined npm_config_node_gyp (node "C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
在此解決方案中一次建置一個專案。若要啟用平行建置,請新增 "/m" 參數。
  addon.cpp
  displayIntermediateValues.cpp
  KeccakF-1600-reference.cpp
  KeccakNISTInterface.cpp
  KeccakSponge.cpp
  win_delay_load_hook.cc
c:\users\asus\appdata\local\node-gyp\cache\12.10.0\include\node\node.h(656): warning C4819: 檔案含有無法在目前字碼頁 (950) 中表示的字元。請
以 Unicode 格式儲存檔案以防止
資料遺失 (正在編譯原始程式檔 ..\src\addon.cpp) [C:\Users\ASUS\Desktop\lottery_react\node_modules\sha3\build\sha3.vcxproj]
c:\users\asus\desktop\lottery_react\node_modules\sha3\src\addon.cpp(49): warning C4316: 'SHA3Hash': 在堆積上配置的物件可能不是對齊的 32 [C:\Users\ASUS\Des
ktop\lottery_react\node_modules\sha3\build\sha3.vcxproj]
c:\users\asus\desktop\lottery_react\node_modules\sha3\src\addon.cpp(83): warning C4996: 'v8::Object::Set': 宣告為已被取代 [C:\Users\ASUS\Desktop\
lottery_react\node_modules\sha3\build\sha3.vcxproj]
  c:\users\asus\appdata\local\node-gyp\cache\12.10.0\include\node\v8.h(3371): note: 請參閱 'v8::Object::Set' 的宣告
C:\Users\ASUS\AppData\Local\node-gyp\Cache\12.10.0\x64\node.lib : fatal error LNK1106: 檔案無效或磁碟已滿: 無法搜尋到 0x2E3938 [C:\Users\ASUS\Desktop\lo
ttery_react\node_modules\sha3\build\sha3.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1gyp ERR! stack     at ChildProcess.onExit (C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:196:23)   
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node\\bin\\node.exe" "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASUS\Desktop\lottery_react\node_modules\sha3
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN @typescript-eslint/eslint-plugin@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3@1.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sha3@1.2.3 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\ASUS\AppData\Roaming\npm-cache\_logs\2019-09-16T03_44_00_801Z-debug.log

然后它告诉我输入node-gyp rebuild,然后弹出另一个错误gyp: binding.gyp not found

C:\Users\ASUS\Desktop\lottery_react>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@12.10.0 | win32 | x64
gyp info find Python using Python version 2.7.16 found at "C:\Users\ASUS\.windows-build-tools\python27\python.exe"
gyp info find VS using VS2017 (15.9.28307.812) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\ASUS\.windows-build-tools\python27\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\ASUS\\Desktop\\lottery_react\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\ASUS\\AppData\\Local\\node-gyp\\Cache\\12.10.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\ASUS\\AppData\\Local\\node-gyp\\Cache\\12.10.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\ASUS\\AppData\\Local\\node-gyp\\Cache\\12.10.0\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\ASUS\\Desktop\\lottery_react',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\ASUS\\Desktop\\lottery_react\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: binding.gyp not found (cwd: C:\Users\ASUS\Desktop\lottery_react) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\ASUS\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:344:16)
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node\\bin\\node.exe" "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASUS\Desktop\lottery_react
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok

0 个答案:

没有答案