Closed maroy1986 closed 6 years ago
I'm reproducing this error too. Angular 6 will be out soon.
I fixed it by adding declare var module: {}; above the module line in main.ts
However, it reloads the window on scss inline-template style.
This is also tracked here in the CLI issues : https://github.com/angular/angular-cli/issues/10268
About error TS2304: Cannot find name 'module': do you think may it due to a missing typescript definition?
Can you try to npm install --save-dev @types/node@~8.9.4 @types/webpack-env@^1.13.6
and add the directive below in your src/typings.d.ts
?
///<reference types="webpack-env" />
@enten that works. Thank you :)
Somehow, this started working again, weird but I'm gonna close this issue and pretend it was something on my end.
@maroy1986 is very strange but I have two equal projects (same config files, same versions, same node, same yarn, etc...) and one works properly and the other throws the error.
I found here https://github.com/angular/angular-cli/wiki/stories-configure-hmr one thing that solves the problem but I only need in one of the two projects.
Add the necessary types to src/tsconfig.app.json
{ ... "compilerOptions": { ... "types": ["node"] }, }
Hey there,
Maybe you already know, but this library doesn't work anymore with WebPack 4 and Angular 6. Here's what I get when trying to
ng serve
.This is most likely related to the big changes that happened in WebPack 4. Is there any plans to upgrade this? If not on your end, I might peek at it if I don't found any other alternatives.
Thanks.
My CLI infos are the following :