错误的ERR!文件WindowsPowerShell \ v1.0,而Windows 7上的npm node-sass

时间:2016-11-12 04:02:07

标签: node.js windows powershell npm node-sass

node-sass

上使用npm安装Windows 7时遇到以下错误
12689 verbose stack Error: windows-build-tools@0.5.0 postinstall: `node ./lib/index.js`
12689 verbose stack spawn C:\Windows\system32\cmd.exe;C:\ProgramData\Oracle\Java\javapath; ENOENT
12689 verbose stack     at exports._errnoException (util.js:1036:11)
12689 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
12689 verbose stack     at onErrorNT (internal/child_process.js:359:16)
12689 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:74:11)
12689 verbose stack     at process._tickCallback (internal/process/next_tick.js:98:9)
12690 verbose pkgid windows-build-tools@0.5.0
12691 verbose cwd C:\Windows\System32
12692 error Windows_NT 6.1.7601
12693 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "windows-build-tools@0.5.0"
12694 error node v6.6.0
12695 error npm  v3.10.3
12696 error file C:\Windows\system32\cmd.exe;C:\ProgramData\Oracle\Java\javapath;
12697 error path C:\Windows\system32\cmd.exe;C:\ProgramData\Oracle\Java\javapath;
12698 error code ELIFECYCLE
12699 error errno ENOENT
12700 error syscall spawn C:\Windows\system32\cmd.exe;C:\ProgramData\Oracle\Java\javapath;
12701 error windows-build-tools@0.5.0 postinstall: `node ./lib/index.js`
12701 error spawn C:\Windows\system32\cmd.exe;C:\ProgramData\Oracle\Java\javapath; ENOENT
12702 error Failed at the windows-build-tools@0.5.0 postinstall script 'node ./lib/index.js'.

enter image description here

1 个答案:

答案 0 :(得分:1)

必须从ComSpec中完全删除Environment Variables变量才能安装此内容。

Reference from github ticket.

enter image description here