程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> windows-nodejs創建kraken項目報錯,使用vs2013

windows-nodejs創建kraken項目報錯,使用vs2013

編輯:編程綜合問答
nodejs創建kraken項目報錯,使用vs2013

創建一個KRAKEN項目,npm install -g generator-kraken,報錯提示node版本過低,手動升級版本0.10.28至4.2.4,繼續創建,報錯:

在此解決方案中一次生成一個項目。若要啟用並行生成,請添加“/m”開關。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(399,5): error MSB3191: 無法創建目錄“Release\obj\thread_sleep\thread_sleep.tlog\”。指定的路徑或文件名太長,或者兩者都太長。完全限定文件名必須少於 260 個字符,並且目錄名必須少於 248 個字符。 [C:\Users\liuxiang\AppData\Roaming\npm\node_modules\generator-kraken\node_modules\yeoman-generator\node_modules\cross-spawn\node_modules\spawn-sync\node_modules\try-thread-sleep\node_modules\thread-sleep\build\thread_sleep.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Document\node.js\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Document\node.js\node.exe" "C:\Document\node.js\node_
modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-b
uild" "--module=C:\Users\liuxiang\AppData\Roaming\npm\node_modules\genera
tor-kraken\node_modules\yeoman-generator\node_modules\cross-spawn\node_modu
les\spawn-sync\node_modules\try-thread-sleep\node_modules\thread-sleep\lib
\binding\Release\node-v46-win32-x64\thread_sleep.node" "--module_name=thread
sleep" "--module_path=C:\Users\liuxiang\AppData\Roaming\npm\node_modules\
\generator-kraken\node_modules\yeoman-generator\node_modules\cross-spawn\no
de_modules\spawn-sync\node_modules\try-thread-sleep\node_modules\thread-sle
ep\lib\binding\Release\node-v46-win32-x64"
gyp ERR! cwd C:\Users\liuxiang\AppData\Roaming\npm\node_modules\generator-kraken
\node_modules\yeoman-generator\node_modules\cross-spawn\node_modules\spawn-sync\
node_modules\try-thread-sleep\node_modules\thread-sleep
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-
to-build --module=C:\Users\liuxiang\AppData\Roaming\npm\node_modules\generator-k
raken\node_modules\yeoman-generator\node_modules\cross-spawn\node_modules\spawn-
sync\node_modules\try-thread-sleep\node_modules\thread-sleep\lib\binding\Release
\node-v46-win32-x64\thread_sleep.node --module_name=thread_sleep --module_path=C
:\Users\liuxiang\AppData\Roaming\npm\node_modules\generator-kraken\node_modules\
yeoman-generator\node_modules\cross-spawn\node_modules\spawn-sync\node_modules\t
ry-thread-sleep\node_modules\thread-sleep\lib\binding\Release\node-v46-win32-x64
' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\liuxiang\AppDa
ta\Roaming\npm\node_modules\generator-kraken\node_modules\yeoman-generator\node

modules\cross-spawn\node_modules\spawn-sync\node_modules\try-thread-sleep\node_m
odules\thread-sleep\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi
ld_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\Document\node.js\node.exe" "C:\Users\liuxiang
\AppData\Roaming\npm\node_modules\generator-kraken\node_modules\yeoman-ge
nerator\node_modules\cross-spawn\node_modules\spawn-sync\node_modules\try-
thread-sleep\node_modules\thread-sleep\node_modules\node-pre-gyp\bin\node-
pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\liuxiang\AppData\Roaming\npm\node_modules\generat
or-kraken\node_modules\yeoman-generator\node_modules\cross-spawn\node_modules\sp
awn-sync\node_modules\try-thread-sleep\node_modules\thread-sleep
node-pre-gyp ERR! node -v v4.2.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.9
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\liux
iang\AppData\Roaming\npm\node_modules\generator-kraken\node_modules\yeoman-gener
ator\node_modules\cross-spawn\node_modules\spawn-sync\node_modules\try-thread-sl
eep\node_modules\thread-sleep\lib\binding\Release\node-v46-win32-x64\thread_slee
p.node --module_name=thread_sleep --module_path=C:\Users\liuxiang\AppData\Roamin
g\npm\node_modules\generator-kraken\node_modules\yeoman-generator\node_modules\c
ross-spawn\node_modules\spawn-sync\node_modules\try-thread-sleep\node_modules\th
read-sleep\lib\binding\Release\node-v46-win32-x64' (1)
npm WARN optional dep failed, continuing [email protected]

[email protected] postinstall C:\Users\liuxiang\AppData\Roaming\npm\node_modul
es\generator-kraken\node_modules\yeoman-generator\node_modules\cross-spawn\node_
modules\spawn-sync
node postinstall

[email protected] C:\Users\liuxiang\AppData\Roaming\npm\node_modules\genera
tor-kraken
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], supports-colo
[email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected]
.0, [email protected], [email protected])
└── [email protected] ([email protected], [email protected], yeoman-
[email protected], [email protected], [email protected], [email protected], a
[email protected], [email protected], [email protected], [email protected], [email protected], dargs@
4.1.0, [email protected], [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected], [email protected], glob@
5.0.15, [email protected], [email protected], [email protected], [email protected], gith
[email protected], [email protected], [email protected], [email protected]
.2, [email protected], [email protected], [email protected], [email protected], in
[email protected], [email protected])

最佳回答:


將 nodejs 工程放在根目錄中試試,看錯誤的提示是目錄層級太深了

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved