angularjs - Angular2种子: npm start has gulp error

标签 angularjs node.js angular

当我在 angular2 种子文件上运行 npm start 时,我试图尝试它,它向我发回一个错误,指出它在 gulp 脚本中失败。我的node和npm是最新的,所以不可能是这样。还有其他人遇到过此错误吗?或者对它可能是什么有任何建议吗?

Angular 种子文件:https://github.com/mgechev/angular2-seed 我的 Node 版本:v6.2.1 我的NPM版本:3.10.1

charlottes-mbp:angular2-seed 2 charlotte$ npm start

> angular2-seed@1.0.0 start /Users/charlotte/angular2-seed 2
> concurrent "npm run gulp" "npm run lite"

"concurrent" command is deprecated, use "concurrently" instead.

[0]
[0] > angular2-seed@1.0.0 gulp /Users/charlotte/angular2-seed 2
[0] > gulp
[0]
[1]
[1] > angular2-seed@1.0.0 lite /Users/charlotte/angular2-seed 2
[1] > lite-server
[1]
[0] (node:97801) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[1] Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
[1] ** browser-sync config **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   watchOptions: { ignored: 'node_modules' },
[1]   server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[0] /Users/charlotte/angular2-seed 2/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:15
[0]     throw new Error(errors.missingBinary());
[0]     ^
[0]
[0] Error: Missing binding /Users/charlotte/angular2-seed 2/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-48/binding.node
[0] Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 6.x
[0]
[0] Found bindings for the following environments:
[0]   - OS X 64-bit with Node 0.12.x
[0]
[0] This usually happens because your environment has changed since running `npm install`.
[0] Run `npm rebuild node-sass` to build the binding for your current environment.
[0]     at Object.<anonymous> (/Users/charlotte/angular2-seed 2/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:15:11)
[0]     at Module._compile (module.js:541:32)
[0]     at Object.Module._extensions..js (module.js:550:10)
[0]     at Module.load (module.js:458:32)
[0]     at tryModuleLoad (module.js:417:12)
[0]     at Function.Module._load (module.js:409:3)
[0]     at Module.require (module.js:468:17)
[0]     at require (internal/module.js:20:19)
[0]     at Object.<anonymous> (/Users/charlotte/angular2-seed 2/node_modules/gulp-sass/index.js:187:21)
[0]     at Module._compile (module.js:541:32)
[0]
[0] npm
[0]  ERR! Darwin 14.1.1
[0] npm ERR! argv "/usr/local/Cellar/node/6.2.1/bin/node" "/usr/local/bin/npm" "run" "gulp"
[0] npm ERR! node v6.2.1
[0] npm ERR! npm  v3.10.1
[0] npm ERR! code ELIFECYCLE
[0] npm ERR! angular2-seed@1.0.0 gulp: `gulp`
[0] npm ERR!
[0]  Exit status 1
[0] npm ERR!
[0] npm ERR! Failed at the angular2-seed@1.0.0 gulp script 'gulp'.
[0] npm ERR! Make sure you have the latest version of node.js and npm installed.
[0] npm ERR! If you do, this is most likely a problem with the angular2-seed package,
[0] npm ERR! not with npm itself.
[0] npm ERR!
[0]  Tell the author that this fails on your system:
[0] npm ERR!     gulp
[0] npm ERR! You can get information on how to open an issue for this project with:
[0] npm ERR!     npm bugs angular2-seed
[0] npm
[0]  ERR! Or if that isn't available, you can get their info via:
[0] npm ERR!     npm owner ls angular2-seed
[0] npm ERR! There is likely additional logging output above.
[0]
[0] npm ERR! Please include the following file with any support request:
[0] npm ERR!     /Users/charlotte/angular2-seed 2/npm-debug.log
[0] npm run gulp exited with code 1

最佳答案

这个问题的解决方式与 this 相同。

我只是运行sudo npm update -g && sudo npm install -g gulp

谢谢@Shivam

关于angularjs - Angular2种子: npm start has gulp error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37935864/

相关文章:

javascript - Angular JS 转发器 + Bootstrap 轮播

javascript - ng-repeat 定义的次数而不是在数组上重复的方法?

javascript - 如何用换行符替换分号?

node.js - Node.js 中超出了最大调用堆栈大小

node.js - Mongodb 模式在几秒后清空

java - 将 AngularJS 应用程序与 Java Tapestry 平台集成 - Tapestry 引发标记错误

node.js - 如何使用 next.js 应用程序运行 Node 服务器?

javascript - Angular2 身份验证 - 类型 'AsyncSubject<{}>' 不可分配给类型 'AsyncSubject<boolean> - 可观察值和 typescript

angular - Typescript 上的 IsNan

javascript - Angular 模板中的 url 字符编码