ngx-chips: Webpack AOT build fails
I’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request/question
Current behavior
AOT build fails in prod. In local with just regular webpack it runs fine.
Include “import {TagInputModule} from ‘ng2-tag-input’;” in module and AOT fails with a not very informative
17% building modules 61/62 modules 1 active ...rise\front\static\scss\bootstrap.scssModuleNotFoundError: Module not found: Error: Can't resolve './../aot/app/app.module.ngfactory'
Without the TagInputModule import it builds fine.
17% building modules 61/62 modules 1 active …rise\front\static\scss\bootstrap.scssModuleNotFoundError: Module not found: Error: Can’t resolve ‘./…/aot/app/app.module.ngfactory’ in ‘C:\Users\Harles\Documents\Projects\vitarise\front\app’ at factoryCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\webpack\lib\Compilation.js:260:39) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\webpack\lib\NormalModuleFactory.js:243:19 at onDoneResolving (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\webpack\lib\NormalModuleFactory.js:59:20) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\webpack\lib\NormalModuleFactory.js:132:20 at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:3694:9 at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:356:16 at iteratorCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:934:13) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:840:16 at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:3691:13 at apply (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:21:25) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\async\dist\async.js:56:12 at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\webpack\lib\NormalModuleFactory.js:124:22 at onResolved (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:70:11) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at afterInnerCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:138:10) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at Resolver.applyPluginsAsyncSeriesBailResult1 (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\tapable\lib\Tapable.js:181:46) at innerCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:125:19) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\tapable\lib\Tapable.js:283:15 at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:38:4 at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at afterInnerCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:138:10) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at Resolver.applyPluginsAsyncSeriesBailResult1 (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\tapable\lib\Tapable.js:181:46) at innerCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:125:19) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) at C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\tapable\lib\Tapable.js:283:15 at innerCallback (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\Resolver.js:123:11) at loggingCallbackWrapper (C:\Users\Harles\Documents\Projects\vitarise\front\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19) resolve ‘./…/aot/app/app.module.ngfactory’ in ‘C:\Users\Harles\Documents\Projects\vitarise\front\app’ using description file: C:\Users\Harles\Documents\Projects\vitarise\front\package.json (relative path: ./app) Field ‘browser’ doesn’t contain a valid alias configuration after using description file: C:\Users\Harles\Documents\Projects\vitarise\front\package.json (relative path: ./app) using description file: C:\Users\Harles\Documents\Projects\vitarise\front\package.json (relative path: ./aot/app/app.module.ngfactory) as directory C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory doesn’t exist no extension Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory doesn’t exist .ts Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory.ts doesn’t exist .js Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory.js doesn’t exist .html Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory.html doesn’t exist .css Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory.css doesn’t exist .scss Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\Harles\Documents\Projects\vitarise\front\aot\app\app.module.ngfactory.scss doesn’t exist
Expected behavior
AOT build runs without errors
Minimal reproduction of the problem with instructions (if applicable)
What is the motivation / use case for changing the behavior? (if applicable)
What do you use to build your app? (SystemJS, Webpack, angular-cli, etc.). Please specify the version
Webpack and Webpack AOT
Angular version:
Angular 4.2.2
Webpack 2.3.3
@ngtools/webpack 1.4.1
ng2-tag-input version:
ng-tag-input 1.3.3
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (5 by maintainers)
I am facing the same issue. It works great without AOT. when I compile it using AOT it seems that the css is not loading correctly or at all :
@dbusacca I have tried adding the loaders you’ve specified but the result hasn’t changed.
@Gbuomprisco Any news regarding this issue?
It’s not something I’ve been able to reproduce