我无法成功使用安装npm软件包

我无法成功使用安装npm软件包,npm,Npm,我正在尝试下载一些源代码并构建一个软件。自述文件说它需要使用npm工具。就像第一次使用npm安装,然后是npm运行构建,然后是npm运行开发。然而,当我尝试使用npm安装时,我被卡住了。我无法成功安装npm软件包 以下是一些错误消息: C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection>if not defined npm_config_node_gyp (node "C:\Users\michael li

我正在尝试下载一些源代码并构建一个软件。自述文件说它需要使用npm工具。就像第一次使用npm安装,然后是npm运行构建,然后是npm运行开发。然而,当我尝试使用npm安装时,我被卡住了。我无法成功安装npm软件包

以下是一些错误消息:

C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection>if not defined npm_config_node_gyp (node "C:\Users\michael liu\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\michael liu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  detection.cpp
  deviceList.cpp
  detection_win.cpp
  win_delay_load_hook.cc
..\src\detection_win.cpp(5): fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory [C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\build\detection.vcxproj]
..\src\detection.cpp(60): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\build\detection.vcxproj]
  C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
..\src\detection.cpp(105): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\build\detection.vcxproj]
  C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
..\src\detection.cpp(195): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\build\detection.vcxproj]
  C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\michael liu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\michael liu\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\michael liu\Desktop\IBSMK\ibsmk\node_modules\usb-detection
gyp ERR! node -v v10.11.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN IBSMK@1.5.5 No repository field.
npm WARN IBSMK@1.5.5 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! usb-detection@4.3.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usb-detection@4.3.0 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\michael liu\AppData\Roaming\npm-cache\_logs\2019-07-30T02_53_24_589Z-debug.log
在节点v10和Electron出现时,出现了一系列问题 v3 wrt it未向节点abi报告正确的abi版本。这个 解决方案似乎是“不要使用节点v10”


您可能想看看这个。我最近在一个需要安装windows build工具的现有项目中遇到了一个node gyp错误,我不知道为什么——从来没有查到底。