You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular RC5 app updated from CLI beta 10 to webpack 2 giving issues. #1665
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
El Capitan
Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.11-webpack.2
node: 4.4.7
os: darwin x64
Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
The app was created using angular-cli.beta.10 and now trying to upgrade it to 11-webpack-2
Wow thanks @vapits - It really did clear out those errors. I believe this should be mentioned on the update guide as well.
I now hit another issue if you be kind enough to shine some light on it :)
Error: Uncaught (in promise): TypeError: Cannot read property 'import' of undefined
Also i noticed that if i change the most of the files CLI re-bundles the app but for some reason the it doesn't notice any changes for one of the modules which is really weird. Any ideas what might be wrong?
hassan the solution for your problem is not to delete moduleId from everything, that will lead to errors importing if you don't change all of your paths.
In the above code - /login and /catalog modules do not push saved changes for webpack to rebundle. Perhaps its intentional? (because thats a separate NgModule)
./src/app/app.component.ts (and all other components) - removed module.id, sass/less/stylus preprocessing now uses the real extension in styleUrls instead of .css.
Activity
vapits commentedon Aug 12, 2016
Remove
module.idfrom all components.This will solve your issues.
hassanasad commentedon Aug 12, 2016
Wow thanks @vapits - It really did clear out those errors. I believe this should be mentioned on the update guide as well.
I now hit another issue if you be kind enough to shine some light on it :)
Also i noticed that if i change the most of the files CLI re-bundles the app but for some reason the it doesn't notice any changes for one of the modules which is really weird. Any ideas what might be wrong?
vapits commentedon Aug 12, 2016
Well without your code in this can't be sure.
Open a SO question is my proposal with your code and close this issue.
antonyRoberts commentedon Aug 12, 2016
hassan the solution for your problem is not to delete moduleId from everything, that will lead to errors importing if you don't change all of your paths.
The answer to the issue is this pull request.
angular/angular@f54f9ef
For you to apply it yourself all you need to do is change metadata_resolver.js in your build
You'll have to go back and undo all of your module.id deletes, or update paths on all of the files you removed moudleId from
vapits commentedon Aug 12, 2016
@antonyRoberts
module.id from components should be removed. Directives also.
hassanasad commentedon Aug 13, 2016
So basically i found out that the routes which contain
loadChildrenproperty do not detect saved changes for that module.For example:
In the above code - /login and /catalog modules do not push saved changes for webpack to rebundle. Perhaps its intentional? (because thats a separate NgModule)
hassanasad commentedon Aug 15, 2016
Update: This is actually an issue with webpack version of Angular. Here is a solution that should work while angular-cli is being updated: https://gist.github.com/brandonroberts/02cc07face25886fe142c4dbd8da1340
filipesilva commentedon Aug 22, 2016
module.idremoval is mentioned on the upgrade procedure: https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.mdThe
loadChildrenissues are addressed by #1632angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.