簡體   English   中英

如何解決與包node-gyp相關的節點包管理器錯誤?

[英]How to solve node package manager errors with related to package node-gyp?

我知道這個問題已經回答了很多 但是我無法使用提供的方法解決這種情況.npm安裝后,我得到了這些錯誤試圖重建node-gyp沒有任何收益。 節點= 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

我在使用3.13.1的shrinkwrap和fsevents軟件包(Mac OS專用)時遇到了問題。 如果刪除npmshrinkwrap.json文件,則可以運行npm i,它將運行良好。 一旦我升級到npm v4.0.3,它就可以使用rinkerwrap了。 當然,所有這些都假設您使用了收縮包裝。

看起來問題與此有關:

找不到Windows SDK版本8.1。 安裝所需版本的Windows SDK或在項目頁面中更改SDK版本,或通過右鍵單擊解決方案並選擇“重新定位解決方案”。 [C:\\ Users \\ Pirate \\ Desktop \\ Nem \\ nem_find \\ node_modules \\ node-expat \\ build \\ deps \\ libexpat \\ expat.vcxproj]

您需要先安裝Windows SDK,然后才能使用node-gyp重新編譯。

再次檢查您的package.json文件是否提供了可用的node-gyp模塊,如果沒有可用的,則使用版本ID,然后添加並再次從npm安裝。

我在頂部發表了評論,但有必要讓大家知道。我只用了15分鍾就在Debian上設置了我想說的一切。 我的建議是遷移到Mac或Linux,我尊重@Microsoft對那里的雲所做的工作,但除了Windows之外,其他人都還沒有得到它,這將需要他們再十年來解決開發社區的問題。 您問任何我的意思是,任何與MEAN Django或ROR合作的開發人員都不會僅僅因為不可靠就無法推薦Windows而推薦Windows。.....sad :(

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM