使用phpstorm,尝试让mongoDB服务器启动并使用nodeJS运行,我安装了mongo,并在c驱动器上创建了所需的文件夹来存储数据库,然后进入命令提示符并输入mongod,使mongoDB运行.
已选中

npm,mongoose和mongo都是很好的,我的包json文件中也有。
当我试图从逗号提示‘节点index.js’运行索引文件时,我得到以下错误,请参阅图片中的详细信息,我已经包含了用于设置mongo的代码.我已经从phpstorm存储库禁用了mongoserver,并使用了mongodb网站上的一个。
"mongodb":"3.0.0-rc0","mongoose":"^5.0.0-rc2",
var mongoose =require('mongoose');
//connect to mongoose
mongoose.connect('mongodb://localhost/quaver');
mongoose.connection.once('open', function(){
console.log('connection has been made , and is running')
});
mongoose.on('error', function(error){
console.log('Connection error',error);
});
发布于 2018-01-16 10:41:19
在当前项目的节点模块文件夹中,从semver.js文件中省略以下行排序错误
第203 204项
//reCOMPARATORTRIM =新RegExp(srcCOMPARATORTRIM,'g');//nodevar comparatorTrimReplace =‘$2$3’;
和第232行
// rei =新RegExp;
猫鼬现在开始跑了

https://stackoverflow.com/questions/48119354
复制相似问题