amitmahida92 / ng4-loading-spinner

Angular 4 custom async loading spinner.
MIT License
69 stars 31 forks source link

ng build --prod #9

Closed justogaiht closed 6 years ago

justogaiht commented 7 years ago

ng build runs fine, but with --prod the following error occur

ERROR in ./src/$$_gendir/app/app.component.ngfactory.ts Module not found: Error: Can't resolve 'ng4-loading-spinner/ng4LoadingSpinner.component' in '/src/$$_gendir/app' resolve 'ng4-loading-spinner/ng4LoadingSpinner.component' in '/src/$$_gendir/app' Parsed request is a module using description file: /package.json (relative path: ./src/$$_gendir/app) Field 'browser' doesn't contain a valid alias configuration after using description file: /package.json (relative path: ./src/$$_gendir/app) resolve as module

/src/$$_gendir/app/node_modules doesn't exist or is not a directory /src/node_modules doesn't exist or is not a directory /opt/node_apps/node_modules doesn't exist or is not a directory /opt/node_modules doesn't exist or is not a directory /node_modules doesn't exist or is not a directory looking for modules in /node_modules using description file: /package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /package.json (relative path: ./node_modules) using description file: /node_modules/ng4-loading-spinner/package.json (relative path: ./ng4LoadingSpinner.component) no extension Field 'browser' doesn't contain a valid alias configuration /node_modules/ng4-loading-spinner/ng4LoadingSpinner.component doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /node_modules/ng4-loading-spinner/ng4LoadingSpinner.component.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /node_modules/ng4-loading-spinner/ng4LoadingSpinner.component.js doesn't exist as directory /node_modules/ng4-loading-spinner/ng4LoadingSpinner.component doesn't exist
pdecembre commented 7 years ago

I am also getting the same issue, building with angular/cli --aot=true (relative path: ./src/ng4-loading-spinner/ng4LoadingSpinner.service) no extension Field 'browser' doesn't contain a valid alias configuration \src\ng4-loading-spinner\ng4LoadingSpinner.service doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration \src\ng4-loading-spinner\ng4LoadingSpinner.service.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration \src\ng4-loading-spinner\ng4LoadingSpinner.service.js doesn't exist as directory \src\ng4-loading-spinner\ng4LoadingSpinner.service doesn't exist looking for modules in \src using description file: \package.json (relative path: ./src) Field 'browser' doesn't contain a valid alias configuration after using description file: \package.json (relative path: ./src) using description file: \package.json (relative path: ./src/ng4-loading-spinner/ng4LoadingSpinner.service) no extension Field 'browser' doesn't contain a valid alias configuration ***\src\ng4-loading-spinner\ng4LoadingSpinner.service doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration

justogaiht commented 7 years ago

Ya.. i believe that this issue is direct related whit aot... the flag --prod of ng build includes --aot during the build process... if i execute the build process "ng build --env=prod --output-hash none" (ignoring --aot) every thing goes fine...

amitmahida92 commented 6 years ago

Hello @justogaiht and @justogaiht ,

This is now fixed in the latest version 1.1.1.

Please reopen the issue if you still face the same. :+1:

Thank you.