我尝试使用默认配置设置Sitecore Habitat解决方案但不幸的是,当我尝试第三个任务时发布所有项目,构建失败,显示以下错误:
> cmd.exe /c gulp -b "C:\Projects\Habitat" --color --gulpfile "C:\Projects\Habitat\Gulpfile.js" 03-Publish-All-Projects
[11:12:23] Using gulpfile C:\Projects\Habitat\Gulpfile.js
[11:12:23] Starting '03-Publish-All-Projects'...
[11:12:23] Starting 'Build-Solution'...
[11:12:23] Using automatic maxcpucount
[11:12:23] { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }
[11:12:23] Build failed!
[11:12:23] 'Build-Solution' errored after 101 ms
[11:12:23] Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
[11:12:23] '03-Publish-All-Projects' errored after 112 ms
[11:12:23] Error in plugin 'run-sequence(Build-Solution)'
Message:
spawn ENOENT
Details:
code: ENOENT
errno: ENOENT
syscall: spawn
Stack:
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
Process terminated with code 1.
我设置的环境与以下链接https://github.com/Sitecore/Habitat/wiki/01-Getting-Started中描述的完全相同。
答案 0 :(得分:3)
似乎没有找到npm模块gulp。 如果已安装npm模块,请将以下内容添加到环境变量中的路径:%AppData%\ npm
注意:不要忘记关闭并重新打开cmd(或VS2015)。