我是第一次尝试使用AngularJS。在完成CodeSchool上的一些课程后,我想到使用angular-seed存储库作为基础模板来启动我自己的AngularJS应用程序。将angular-seed repository克隆到我的计算机后,我在angular-seed目录中运行了以下命令:
npm install
但是,我收到错误,我无法使用以下命令运行该应用程序:
npm start
我按照README文件中的说明操作。但是,终端显示以下输出:
evert@evert-Latitude-E6530:~/AngularJS/workspace/angular-seed$ npm install
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> bufferutil@1.2.1 install /home/evert/AngularJS/workspace/angular-seed/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
make: Leaving directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/bufferutil/build'
> utf-8-validate@1.2.1 install /home/evert/AngularJS/workspace/angular-seed/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/utf-8-validate/build'
> ws@0.4.32 install /home/evert/AngularJS/workspace/angular-seed/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/evert/AngularJS/workspace/angular-seed/node_modules/ws/build'
> angular-seed@0.0.0 postinstall /home/evert/AngularJS/workspace/angular-seed
> bower install
/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/home/evert/.config/configstore/bower-github.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at Object.create.all.get (/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
at Object.Configstore (/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
at readCachedConfig (/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/home/evert/AngularJS/workspace/angular-seed/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm ERR! Linux 3.13.0-85-generic
npm ERR! argv "/home/evert/local/bin/node" "/home/evert/local/bin/npm" "install"
npm ERR! node v6.1.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 postinstall script 'bower install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-seed
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/evert/AngularJS/workspace/angular-seed/npm-debug.log
evert@evert-Latitude-E6530:~/AngularJS/workspace/angular-seed$
我使用npm v3.8.9安装了节点v6.1.0。我正在运行Ubuntu 14.04 LTS。
我按照npm的一些troubleshooting提示,但仍然没有成功。
任何其他帮助/建议,以解决这个问题?
答案 0 :(得分:0)
请尝试以下命令:
sudo npm -g install bower
这会将bower安装为sudo权限下的全局npm包。