嗨,我正在尝试在我的Ionic 2应用程序中配置我的firebase-admin。代码如下所示(注意我省略了私钥):
admin.initializeApp({
credential: admin.credential.cert({
projectId: "jobjack-28894",
clientEmail: "firebase-adminsdk-j8y48@jobjack-28894.iam.gserviceaccount.com",
}),
databaseURL: "https://jobjack-28894.firebaseio.com"
})
当应用程序运行时,我得到以下结果。
Uncaught Error: Cannot find module "."
at webpackMissingModule (defaultable.js:49)
at Object.workaround_require (defaultable.js:49)
at require (defaultable.js:77)
at server.js:9
at defaulter (defaultable.js:83)
at defaultable (defaultable.js:63)
at good (defaultable.js:174)
at Object.<anonymous> (server.js:5)
at Object.<anonymous> (server.js:240)
at __webpack_require__ (bootstrap fad59d6ced6383582390:54)
任何建议。一直在寻找类似的错误,但找不到这样的东西。一直试图调试但没有运气。
我的package.json如下所示:
{
"name": "sidemenu_ionic",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"config": {
"ionic_webpack": "./webpack.config.js"
},
"scripts": {
"clean": "ionic-app-scripts clean",
"start": "ionic-app-scripts serve --dev",
"build": "ionic-app-scripts build --prod",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build --prod",
"ionic:serve": "ionic-app-scripts serve",
"prod": "ionic-app-scripts serve --prod"
},
"dependencies": {
"@angular/common": "^5.0.1",
"@angular/compiler": "5.0.1",
"@angular/compiler-cli": "5.0.1",
"@angular/core": "5.0.1",
"@angular/forms": "5.0.1",
"@angular/http": "5.0.1",
"@angular/platform-browser": "5.0.1",
"@angular/platform-browser-dynamic": "5.0.1",
"@ionic-native/core": "4.4.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/pro": "1.0.16",
"@ionic/storage": "2.1.3",
"dns": "^0.2.2",
"express": "^4.16.2",
"firebase": "^4.8.0",
"firebase-admin": "^5.7.0",
"ionic-angular": "nightly",
"ionicons": "3.0.0",
"process": "^0.11.10",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "nightly",
"rollup-plugin-replace": "^2.0.0",
"typescript": "2.4.2"
},
"description": "An Ionic project"
}
答案 0 :(得分:0)
谢谢Hiranya,清除它。因此,当应用程序初始化时,我尝试使用管理员用户为数据库播种。所以我从角度应用程序中删除了管理员参考,并添加了一个节点处方,这似乎是100%的工作。谢谢