尝试运行平均堆栈时未处理“错误”事件
我遵循每个安装MEAN堆栈应用程序的指令。
在这一切的结束,我运行grunt
,当我去http://localhost:3000
我得到以下错误:
Running "clean:0" (clean) task Running "jshint:all" (jshint) task >> 47 files lint free. Running "csslint:src" (csslint) task >> 5 files lint free. Running "concurrent:tasks" (concurrent) task Running "nodemon:dev" (nodemon) task Running "watch" task Waiting... [nodemon] v1.0.20 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node --debug server.js` debugger listening on port 5858 Mongoose: packages.findOne({ name: 'config' }) { fields: undefined } 3000 Mean app started on port 3000 (development) Mongoose: users.ensureIndex({ email: 1 }) { safe: undefined, background: true, unique: true } Mongoose: users.ensureIndex({ username: 1 }) { safe: undefined, background: true, unique: true } GET / 304 41.185 ms - - events.js:72 throw er; // Unhandled 'error' event ^ Error: ENOENT, open '/var/www/finnviz/bower_components/bootstrap/dist/css/bootstrap.css' [nodemon] app crashed - waiting for file changes before starting...
我search并find了这个答案 ,但是这似乎并不是这样,当我运行ps aux | grep node
ps aux | grep node
我没有得到任何正在运行的进程:
trufa 14763 0.0 0.0 23492 956 pts/14 S+ 15:39 0:00 grep --color=auto node
我search了很多答案,但似乎没有适用。 有人build议改变这个港口 。 我试过了,错误是一样的。
有关如何进行的任何build议?
有时如果你用sudo运行npm,自动凉亭安装不起作用。
- 我会build议设置
npm
所以它不需要sudo
。 - 尝试从项目根目录运行
$ bower install
,然后重新启动服务器。