如何解决与包node-gyp相关的节点包pipe理器错误?

我知道这个问题已经被多次回答了 。 但我无法用提供的方法来解决这种情况。安装npm后,我得到了这些错误,试图重build节点gyp没有收获。 Node = v7.2.0 Npm = 3.10.9

C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\buffertools>if not defined npm_config_node_gyp (node "C:\Users\Pira te\AppData\Roaming\nvm\v7.2.0\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (nod e "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project p roperty pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\buffertools\build\buffertools.vcxproj] 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\Pirate\AppData\Roaming\nvm\v7.2.0\node_modules\npm\node_modules\node-gyp\lib\b uild.js:276:23) 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 10.0.14393 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Pirate\\AppData\\Roaming\\nvm\\v7.2.0\\node_modules\\npm\\node_ modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\buffertools gyp ERR! node -v v7.2.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok > node-expat@2.3.15 install C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\node-expat > node-gyp rebuild e\AppData\Roaming\nvm\v7.2.0\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project p roperty pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\node-expat\build\deps\libexpat\expat.vcxproj] 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\Pirate\AppData\Roaming\nvm\v7.2.0\node_modules\npm\node_modules\node-gyp\lib\b uild.js:276:23) 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 10.0.14393 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Pirate\\AppData\\Roaming\\nvm\\v7.2.0\\node_modules\\npm\\node_ modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Pirate\Desktop\Nem\nem_find\node_modules\node-expat gyp ERR! node -v v7.2.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN kue-scheduler@0.1.1 requires a peer of async@^0.9.0 but none was installed. npm WARN kue-scheduler@0.1.1 requires a peer of lodash@^3.6.0 but none was installed. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: buffertools@2.1.4 (node_modules\buffertools): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: buffertools@2.1.4 install: `node-gyp rebuild` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! node-expat@2.3.15 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-expat@2.3.15 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 node-expat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-expat npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-expat npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Pirate\Desktop\Nem\nem_find\npm-debug.log 

** / npm安装后的新回复

 npm ERR! node-expat@2.3.15 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-expat@2.3.15 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 node-expat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-expat npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-expat npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\users\pirate\desktop\nem\backup\nem_find\npm-debug.log 

你有没有尝试将npm升级到v4.x? npm安装npm @ latest -g

我在使用shrinkwrap和Mac OS特有的fsevents软件包时遇到了问题。 如果我删除了npmshrinkwrap.json文件,我可以运行npm,而且运行的很好。 一旦我升级到npm的v4.0.3它使用shrinkwrap。 这一切都假设你使用shrinkwrap当然。

看起来问题是这样的:

没有findWindows SDK版本8.1。 安装所需的Windows SDK版本,或在项目属性页面中更改SDK版本,或右键单击解决scheme并select“redirect解决scheme”。 [C:\用户\海盗\桌面\是Nem \ nem_find \ node_modules \节点外籍\构build\ DEPS \的libexpat \ expat.vcxproj]

您需要先安装Windows SDK,然后才能使用node-gyp重新编译。

再次检查你的package.json文件是否可用node-gyp模块或者没有版本ID(如果没有可用的话)然后添加并再次从npm安装。

我在上面做了一个评论,但是让每个人都知道是必要的。我只花了15分钟就把所有的东西都放在了Debian上。 我的build议是迁移到mac或者linux,我尊重微软在云端所做的一切,除了windows之外,还有10年时间来解决开发社区的问题。 你问任何我的意思是任何开发商与平均值Django或ROR工作,他们不会推荐Windows,只是因为它不可靠,你不能相信Windows …..悲伤:(