2017-09-01 76 views
2

时做的时候,我发现了以下错误:在本地还是在实验室中进行测试时ionic build --prod错误建立一个生产建设

Error: ./src/pages/home/home.ngfactory.js Module not found: Error: Can't resolve '../../../angularfire2/database' in '[myPath]\src\pages\home' resolve '../../../angularfire2/database' in '[myPath]\src\pages\home' using description file: [myPath]\package.json (relative path: ./src/pages/home) Field 'browser' doesn't contain a valid alias configuration after using description file: [myPath]\package.json (relative path: ./src/pages/home) using description file: [myPath]\package.json (relative path: ./angularfire2/database) no extension Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database doesn't exist .js Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database.js doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database.ts doesn't exist as directory [myPath]\angularfire2\database doesn't exist [[myPath]\angularfire2\database] [[myPath]\angularfire2\database.js] [[myPath]\angularfire2\database.ts] [[myPath]\angularfire2\database] @ ./src/pages/home/home.ngfactory.js 41:0-59 @ ./src/app/app.module.ngfactory.js @ ./src/app/main.ts,./src/app/app.module.ngfactory.js Module not found: Error: Can't resolve '../../angularfire2/database' in '[myPath]\src\app' resolve '../../angularfire2/database' in '[myPath]\src\app' using description file: [myPath]\package.json (relative path: ./src/app) Field 'browser' doesn't contain a valid alias configuration after using description file: [myPath]\package.json (relative path: ./src/app) using description file: [myPath]\package.json (relative path: ./angularfire2/database) no extension Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database doesn't exist .js Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database.js doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration [myPath]\angularfire2\database.ts doesn't exist as directory [myPath]\angularfire2\database doesn't exist [[myPath]\angularfire2\database] [[myPath]\angularfire2\database.js] [[myPath]\angularfire2\database.ts] [[myPath]\angularfire2\database] @ ./src/app/app.module.ngfactory.js 29:0-56 @ ./src/app/main.ts

的应用程序工作正常。

我是否缺少生产版本的依赖关系?

回答

1

您尝试回滚的版本

AngularFire 4.0.0-rc.1 does not seem to have this issue, 4.0.0-rc.2 does. I rolled back for now.