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
I was able to load the app in a browser. Made a small change to the app.component.ts file (removed the trailing new line). Saved the file, webpack attempted to re-bundle the file, but failed.
I may be wrong, but I believe it may have to do with the fact that the typescript doesn't get compiled, or at least compiled correctly after the first initial build. See my other comment
running ng serve
When I change an HTML file it throws in cmd: ERROR in ./src/app/components/side-menu/side-menu.component.html Module build failed: Error at WebpackCompilerHost.populateWebpackResolver (C:\sandbox\admin.marshallinstalls.co.nz\node_modules\@ngtools\webpack\src\compiler_host.js:218:51) at C:\sandbox\admin.marshallinstalls.co.nz\node_modules\@ngtools\webpack\src\plugin.js:352:33 at process._tickCallback (internal/process/next_tick.js:103:7) @ ./src/app/components/side-menu/side-menu.component.ts 21:22-59 @ ./src/app/app.module.ts @ ./src/main.ts @ multi main
However when I run ng serve --aot it compiles and runs just fine
EDIT: work just fine - for a time. After 6 reloads it gave me the same error as before..
I did some research based on my problem, maybe it helps someone else as well:
i introduced typings into the project, and since I did this, this problem happens with the live-reload of lazy loaded modules. No idea why this happens.
Maybe someone can give a brief info about this?
I'm using the oldschool way of typings as follows:
I know this topic is closed, but when we search on Google this is the first result and I hope it helps whoever comes to this page and see the last comment.
this works for me
yarn add @ngtools/webpack@1.3.0
ng details:
@angular/cli: 1.0.0
node: 7.9.0
os: darwin x64
hocam su adresde #4326 da birkaç kişi sorun yaşamış yarn add @ngtools/webpack@1.3.0 ile biri sorunu çözmüş şimdiki güncel i yarn add @ngtools/webpack@1.8.2 bir denermisiniz
Activity
born2net commentedon Feb 1, 2017
same issue, works fine on first build, subsequent builds fail.
versions
diicar commentedon Feb 1, 2017
Same issue ... :(
rebuilld is too fast 🥇 thank you ;)
born2net commentedon Feb 1, 2017
I agree, I started crying from joy of how fast it was... but started crying again when it crashed
johannesjo commentedon Feb 1, 2017
Same here on ubuntu 16.10 and node 6.9.2.
Happens with ng-cli
1.0.0-beta.22-1
1.0.0-beta.24
1.0.0-beta.26
1.0.0-beta.28
trevor-hackett commentedon Feb 1, 2017
I may be wrong, but I believe it may have to do with the fact that the typescript doesn't get compiled, or at least compiled correctly after the first initial build. See my other comment
intellix commentedon Feb 1, 2017
I'm getting the same issue and have been debugging a little. Not found anything yet but here's an example project: https://github.com/intellix/angular-cli-b28/tree/master/src/app/lazy
I only have the problem when saving lazy SCSS or HTML. Saving a TS doesn't give
Module build failed: errorthoughborn2net commentedon Feb 1, 2017
ok I reverted back to .26 so I can work for now but that was not enough.
I also had to:
until .28 gets stable
web-dave commentedon Feb 1, 2017
@born2net I'll try it out
johannesjo commentedon Feb 1, 2017
That's it! Works also with the new version (.28).
web-dave commentedon Feb 1, 2017
pew, have to do a workshop tomorrow. saved my day/night
fix(@ngtools/webpack): change of CSS no longer breaks rebuild
fix(@ngtools/webpack): change of CSS no longer breaks rebuild
fix(@ngtools/webpack): change of CSS no longer breaks rebuild (#4334)
alshdavid commentedon Feb 2, 2017
I have this problem.
Windows 10
Node 6.9.5
running
ng serveWhen I change an HTML file it throws in cmd:
ERROR in ./src/app/components/side-menu/side-menu.component.html Module build failed: Error at WebpackCompilerHost.populateWebpackResolver (C:\sandbox\admin.marshallinstalls.co.nz\node_modules\@ngtools\webpack\src\compiler_host.js:218:51) at C:\sandbox\admin.marshallinstalls.co.nz\node_modules\@ngtools\webpack\src\plugin.js:352:33 at process._tickCallback (internal/process/next_tick.js:103:7) @ ./src/app/components/side-menu/side-menu.component.ts 21:22-59 @ ./src/app/app.module.ts @ ./src/main.ts @ multi mainHowever when I run
ng serve --aotit compiles and runs just fineEDIT: work just fine - for a time. After 6 reloads it gave me the same error as before..
web-dave commentedon Feb 2, 2017
beta 29 has the same error, but the fix doesn't work!!
Sviatique commentedon Feb 8, 2017
The same thing with beta.30
alshdavid commentedon Feb 8, 2017
I have updated to node
7.5+ clibeta.30(from6.9.5&beta.28) and it seems the problem is no longer present.I also ran an
ng upgradeon the project, though I don't think that would have had an affect.fix(@ngtools/webpack): change of CSS no longer breaks rebuild (angula…
rickardd commentedon Feb 22, 2017
npm install --save @ngtools/webpack@1.2.4
Worked for me too! yay
emreavsar commentedon Mar 7, 2017
anybody facing this issue
"@angular/cli": "^1.0.0-rc.0"inpackage.json?My steps to reproduce:
ng serve-> 👍 worksNote: This issue does not happen, when doing the same in a non lazy module.
Note 2: i have no
@ngtools/webpackin mypackage.jsonat all.emreavsar commentedon Mar 7, 2017
I did some research based on my problem, maybe it helps someone else as well:
i introduced typings into the project, and since I did this, this problem happens with the live-reload of lazy loaded modules. No idea why this happens.
Maybe someone can give a brief info about this?
I'm using the oldschool way of typings as follows:
package.json:
typings.json:
src/tsconfig.app.json:
mhadaily commentedon Apr 15, 2017
I know this topic is closed, but when we search on Google this is the first result and I hope it helps whoever comes to this page and see the last comment.
this works for me
yarn add @ngtools/webpack@1.3.0ng details:
@angular/cli: 1.0.0
node: 7.9.0
os: darwin x64
zinderud commentedon Nov 17, 2017
hocam su adresde #4326 da birkaç kişi sorun yaşamış
yarn add @ngtools/webpack@1.3.0ile biri sorunu çözmüş şimdiki güncel iyarn add @ngtools/webpack@1.8.2bir denermisinizemreavsar commentedon Nov 17, 2017
@zinderud bende problem cözüldü bile aga
angular-automatic-lock-bot commentedon Sep 7, 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.
fix(@ngtools/webpack): change of CSS no longer breaks rebuild (angula…