node-gyp rebuild错误窗口10

时间:2016-11-14 22:28:40

标签: atom-editor node-gyp

为什么在atom上安装term3(Windows 10,Visual Studio 2015)我收到以下错误。我尝试了互联网上提供的所有解决方案,但无法解决问题。有人可以帮我解决这个问题吗?

C:\Users\JoyLal>apm install term3
Installing term3 to C:\Users\JoyLal\.atom\packages failed
> ptyw.js@0.4.1 install C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8\node_modules\term3\node_modules\ptyw.js
> node-gyp rebuild
C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8\node_modules\term3\node_modules\ptyw.js>if not defined npm_config_node_gyp (node "C:\Users\JoyLal\AppData\Local\atom\app-
1.12.2\resources\app\apm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\JoyLal\AppData\Local\atom\app-1.12.2\resources\app\apm\
bin\\..\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the requir
ed version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\JoyLal\AppData\Local\Temp\apm-i
nstall-dir-1161015-1108-j516r8\node_modules\term3\node_modules\ptyw.js\build\vendor\winpty\winpty-agent.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the requir
ed version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\JoyLal\AppData\Local\Temp\apm-i
nstall-dir-1161015-1108-j516r8\node_modules\term3\node_modules\ptyw.js\build\vendor\winpty\winpty.vcxproj]
C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8
`-- (empty)
npm WARN deprecated react-tools@0.11.2: react-tools is deprecated. For more information, 
npm ERR! registry error parsing json
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to fi
nd it in the tree.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
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\JoyLal\AppData\Local\atom\app-1.12.2\resources\app\apm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Users\\JoyLal\\AppData\\Local\\atom\\app-1.12.2\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\JoyLal\\AppData\\Local\\atom\\app-1.12.2\\resources\\app\\apm\\node_modul
es\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8\node_modules\term3\node_modules\ptyw.js
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8\package.json'
npm WARN apm-install-dir-1161015-1108-j516r8 No description
npm WARN apm-install-dir-1161015-1108-j516r8 No repository field.
npm WARN apm-install-dir-1161015-1108-j516r8 No README data
npm WARN apm-install-dir-1161015-1108-j516r8 No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\JoyLal\\AppData\\Local\\atom\\app-1.12.2\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\JoyLal\\AppData\\Local\\atom\\app-1.12.2\\resources\\app\\apm\\node_modules\
\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\JoyLal\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\JoyLal\\.atom\\.apmrc" "install" "C:\\Users\\JoyLal\\AppData\\Local\\Temp\\d-1161015
-1108-dbjp4i\\package.tgz" "--runtime=electron" "--target=1.3.6" "--arch=ia32" "--global-style" "--msvs_version=2015"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! ptyw.js@0.4.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ptyw.js@0.4.1 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 ptyw.js 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 ptyw.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ptyw.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\JoyLal\AppData\Local\Temp\apm-install-dir-1161015-1108-j516r8\npm-debug.log
npm ERR! code 1

我已经安装了visual studio npm msvs_version设置为2015,并且在我的PC上安装了python 2.7.3。

1 个答案:

答案 0 :(得分:0)

以下是日志的错误消息:

  

找不到Windows SDK版本8.1。

所以解决方法是:

  

为Visual Studio 2015安装Visual C ++项目支持(需要3GB空间)。

Credits