我是一个全新的nodemon用户。在按照这个视频12:01的步骤 https://www.youtube.com/watch?v=eB9Fq9I5ocs之后,当我尝试使用nodemon运行我的应用程序时,出现以下错误:
这是APP.JS文件:
我需要做什么才能让nodemon找到index.js模块?
谢谢。
![enter image description here](https://istack.dev59.com/Wbe4B.webp)
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
// Connect to Mongoose
mongoose.connect('mongodb://localhost/ChatbotService')
var db = mongoose.connection;
app.get('/', function(req, res){
res.send('Hola4');
});
app.listen(8601);
console.log('Running on port 8601...');
这是package.json文件:
{
"name": "chatbot",
"version": "1.0.0",
"description": "chatbot app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"express": "*",
"body-parser": "*",
"mongoose": "*"
},
"author": "Chris",
"license": "ISC",
"devDependencies": {
"nodemon": "^1.11.0"
}
}
我需要做什么才能让nodemon找到index.js模块?
谢谢。