简体   繁体   English

尝试运行均值堆栈时未处理的“错误”事件

[英]Unhandled 'error' event while trying to run mean stack

I follower every instruction for installing a MEAN stack application. 我遵循每条有关安装MEAN堆栈应用程序的说明。

At the end of it all I run grunt and when I go to http://localhost:3000 I get the following error: 最后,我运行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...

I searched and found this answer , but this does not seem to be the case, when I run ps aux | grep node 我搜索并找到了这个答案 ,但是当我运行ps aux | grep node时似乎并非如此ps aux | grep node ps aux | grep node I dont get any running process: ps aux | grep node我没有得到任何正在运行的进程:

trufa    14763  0.0  0.0  23492   956 pts/14   S+   15:39   0:00 grep --color=auto node

I searched through many answers but none seem to apply. 我搜索了许多答案,但似乎没有一个适用。 Some suggest to change the port . 一些建议改变港口 I tried it and the error is the same. 我试过了,错误是相同的。

Any suggestions as to how to proceed? 关于如何进行的任何建议?

Sometimes the automatic bower install does not work if you run npm with sudo. 有时,如果您使用sudo运行npm,则自动Bower安装无法正常工作。

  1. I would recommend setting up npm so it does not require sudo . 我建议设置npm因此不需要sudo
  2. Try running $ bower install from your project root, and then restart the server. 尝试从项目根目录运行$ bower install ,然后重新启动服务器。

您已使用相同的端口8080运行另一台服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM