1

我尝试使用默认配置设置 Sitecore Habitat 解决方案,但不幸的是,当我尝试第三个任务 Publish All Projects 时,构建失败并显示以下错误:

> 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中描述的相同。

4

1 回答 1

3

似乎找不到 npm 模块 gulp。如果您已经安装了 npm 模块,请将以下内容添加到环境变量中的路径中:%AppData%\npm

注意:不要忘记关闭并重新打开 cmd(或 VS2015)。

于 2017-03-03T11:44:10.487 回答