【问题标题】:Google web starter kit gulp serve error谷歌网络初学者工具包 gulp 服务错误
【发布时间】:2015-10-06 11:58:33
【问题描述】:

我想开始使用 Google 网络入门工具包。 我安装了 node、ruby、gulp 和 npm

C:\Users\Greg>node -v
v4.1.1

C:\Users\Greg>ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]

C:\Users\Greg>npm -v
2.14.4

C:\Users\Greg>gulp -v
[13:48:29] CLI version 3.9.0

我安装在我的存储库中:

cd my-project
npm install
npm install gulp -g

当我在命令行中使用gulp serve 时出现错误

C:\Users\Greg\Desktop\Web development\web-starter-kit-0.5.4\my-project>gulp serv
e
[13:35:46] Using gulpfile ~\Desktop\Web development\web-starter-kit-0.5.4\my-pro
ject\gulpfile.js
[13:35:46] Starting 'styles'...
[13:35:48] **'styles' errored after 1.63 s**
[13:35:48] Error: `libsass` bindings not found. Try reinstalling `node-sass`?
    at getBinding (C:\Users\Greg\Desktop\Web development\web-starter-kit-0.5.4\m
y-project\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:22:11)
    at Object.<anonymous> (C:\Users\Greg\Desktop\Web development\web-starter-kit
-0.5.4\my-project\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:188
:23)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\Greg\Desktop\Web development\web-      starter-kit
-0.5.4\my-project\node_modules\gulp-sass\index.js:3:17)
    at Module._compile (module.js:434:26)

怎么了? 如何通过浏览器同步在本地服务器上查看它?当我在浏览器中输入 localhost:3000 时,什么也没发生。

【问题讨论】:

    标签: node.js gulp google-web-starter-kit


    【解决方案1】:

    尝试使用节点 0.12(这是以前的版本)。 Node 4 刚刚问世,有些模块可能不适用于其中之一的 libsass。

    【讨论】:

    • 好的,这有效,现在我没有错误。我有疑问,当我在命令行中键入 gulp serve 时会发生什么。它会自动在浏览器中打开项目吗?当我打开索引文件时,我只面对没有 CSS 的 html。为什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 2011-03-11
    • 2011-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多