ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 302 forks source link

Ionic Cordova Build --prod issue @angular\compiler\compiler #1292

Open PrakashKularatnam opened 6 years ago

PrakashKularatnam commented 6 years ago

Ionic Cordova build --prod is not working, the build throws the following issue, I have already removed and installed the node modules but the problem is still exist.

Please can you provide me a solution for this issue. We are unable to release the application in production mode now.

Error: ./src/app/app.module.ngfactory.ts Module not found: Error: Can’t resolve ‘@angular/compiler/compiler’ in 'D:\MobileRD\BARMobileClient\src\app’ resolve ‘@angular/compiler/compiler’ in 'D:\MobileRD\BARMobileClient\src\app’ Parsed request is a module using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./src/app) Field ‘browser’ doesn’t contain a valid alias configuration after using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./src/app) resolve as module looking for modules in D:\MobileRD\BARMobileClient\node_modules using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./node_modules) Field ‘browser’ doesn’t contain a valid alias configuration after using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./node_modules) using description file: D:\MobileRD\BARMobileClient\node_modules@angular\compiler\package.json (relative path: ./compiler) no extension Field ‘browser’ doesn’t contain a valid alias configuration D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler doesn’t exist .ts Field ‘browser’ doesn’t contain a valid alias configuration D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.ts doesn’t exist .js Field ‘browser’ doesn’t contain a valid alias configuration D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.js doesn’t exist .json Field ‘browser’ doesn’t contain a valid alias configuration D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.json doesn’t exist as directory D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler doesn’t exist [D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler] [D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.ts] [D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.js] [D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.json] [D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler] @ ./src/app/app.module.ngfactory.ts 155:0-51 @ ./src/app/main.ts

speedfl commented 6 years ago

Hello

Dupe: https://github.com/ionic-team/ionic-app-scripts/issues/1309

NOaMTL commented 6 years ago

Have the same issue, even with the @ionic/app-scripts : 3.1.2

wjacksondocuwrx commented 6 years ago

Did you try ./node_modules/.bin/ngc?

premji1528 commented 6 years ago

@wjacksondocuwrx how to use this command