我正在获取events.js:136 throw er; 未处理的“错误”事件不知道如何以及为什么?我也重新安装了nodejs和mongodb,但抛出相同的错误。
package.json
{
"name": "bookstore",
"version": "1.0.0",
"description": "simple bookstore app",
"main": "app.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"express": "*",
"body-parser": "*",
"mongoose": "*"
},
"author": "AveesP",
"license": "ISC"
Run Code Online (Sandbox Code Playgroud)
}
App.js代码
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
//connect to mongoose
mongoose.connect('mongodb://localhost/bookstore');
var db = mongoose.connection;
app.get('/', function(req, res) {
res.send('Hello world!');
});
app.listen(3000);
console.log('Running on port …Run Code Online (Sandbox Code Playgroud) 部署代码时出现此错误。
src / app / app.module.ts(26,49)中的错误:错误TS2339:类型'{不存在属性'firebaseConfig'{production:boolean; }'。
App.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { environment } from '../environments/environment';
import { ContactsComponent } from './contacts/contacts.component';
import { ContactComponent } from './contacts/contact/contact.component';
import { ContactListComponent } from './contacts/contact-list/contact-list.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr'; …Run Code Online (Sandbox Code Playgroud) 我已经使用了 Object.parses() 但出现错误
var obj = '
"users": [
{ "name":"John", "age":30, "city":"New York"},
{ "name":"Mike", "age":25, "city":"new jersey"},
]'
Run Code Online (Sandbox Code Playgroud) angular5 ×1
deployment ×1
express ×1
firebase ×1
javascript ×1
json ×1
mongodb ×1
node.js ×1
npm ×1
parsing ×1