Angular2 种子:npm start 有 gulp 错误
Posted
技术标签:
【中文标题】Angular2 种子:npm start 有 gulp 错误【英文标题】:Angular2 seed: npm start has gulp error 【发布时间】:2016-10-22 11:55:14 【问题描述】:当我在 angular2 种子文件上运行 npm start
时,我正在尝试尝试它,它向我发送了一个错误,说它在 gulp 脚本中失败。我的节点和 npm 是最新的,所以不可能是这样。有没有其他人遇到过这个错误或对它可能是什么有任何建议?
角种子文件:https://github.com/mgechev/angular2-seed 我的节点版本: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
【问题讨论】:
看看这个link。该问题已通过使用“-g”全局安装解决。 【参考方案1】:这个问题和this一样解决了
我只是跑了sudo npm update -g && sudo npm install -g gulp
感谢@Shivam
【讨论】:
您可能需要重新考虑以 root 身份运行 npm johnpapa.net/how-to-use-npm-global-without-sudo-on-osx 有趣的阅读!我会让他的向导去看看我能不能把它清理干净。我知道这很糟糕,因为工作,我的笔记本电脑刚刚结束了所有这些可怕的设置以上是关于Angular2 种子:npm start 有 gulp 错误的主要内容,如果未能解决你的问题,请参考以下文章