我正在努力做这个非常均值的应用程序:
https://youtu.be/a-dn6k6Frq4?t=4m47s
当我咕噜咕噜的时候,我会继续这样做,并且不知道这意味着什么或做什么:
meanBlog $ grunt
未找到本地Npm模块“grunt-node-inspector”。它安装了吗? (node:7760)DeprecationWarning:不推荐使用process.EventEmitter。使用require('events')代替。
运行“env:dev”(env)任务
运行“sass:dist”(sass)任务
运行“less:dist”(减去)任务
运行“jshint:all”(jshint)任务
87个文件lint free。
运行“csslint:all”(csslint)任务
2个文件lint free。
运行“mkdir:upload”任务
运行“copy:localConfig”(复制)任务
运行“并发:默认”(并发)任务
未找到本地Npm模块“grunt-node-inspector”。它安装了吗? 未找到本地Npm模块“grunt-node-inspector”。它安装了吗?
Running "watch" task
Waiting...
(node:7652) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
Running "nodemon:dev" (nodemon) task
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: server.js config/**/*.js modules/*/server/**/*.js
[nodemon] starting `node --debug server.js`
(node:6160) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
Debugger listening on [::]:5858
Could not connect to MongoDB!
{ MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (C:\Users\andre\code\meanBlog\node_modules\mongoose\node_modules\mongodb-core\lib\topologies\server.js:328:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection.<anonymous> (C:\Users\andre\code\meanBlog\node_modules\mongoose\node_modules\mongodb-core\lib\connection\pool.js:280:12)
at Connection.g (events.js:292:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket.<anonymous> (C:\Users\andre\code\meanBlog\node_modules\mongoose\node_modules\mongodb-core\lib\connection\connection.js:177:49)
at Socket.g (events.js:292:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
name: 'MongoError',
message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' }
C:\Program Files\nodejs\node.exe: src\debug-agent.cc:149: Assertion `(err) == (0)' failed.
[nodemon] app crashed - waiting for file changes before starting...
答案 0 :(得分:0)
没有安装mongodb。
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org