angular2-aot-cli-webpack-plugin icon indicating copy to clipboard operation
angular2-aot-cli-webpack-plugin copied to clipboard

Watch failes with error

Open rachitbhasin opened this issue 8 years ago • 4 comments

The application compiles the first time just fine. When changes are made the watch starts to re-compile, but fails with the following error:

ERROR in ./src/app/modules/main.module.ngfactory.ts
Module build failed: Error: ENOENT: no such file or directory, open 'D:\Angular2\angular2-aot-cli-webpack-plugin\src\app\modules\main.module.ngfactory.ts'
    at Error (native)
 @ ./src/app/main.ts 1:0-70
 @ multi main
Child src\app\components\hello-world.template.pug:

Child src\app\components\hello-world.style.sass:

webpack: Failed to compile.

Note: I'm on a windows machine.

rachitbhasin avatar Feb 07 '17 08:02 rachitbhasin

Does it work after upgrading deps? @rachitbhasin

sonicoder86 avatar Feb 23 '17 20:02 sonicoder86

@blacksonic I made a new clone of the repo and did npm install . I still get the following error when the watch detects changes:

> [email protected] start E:\Angular2\angular2-aot-cli-webpack-plugin
> webpack-dev-server --config webpack.aot.config.js

Project is running at http://localhost:9000/
webpack output is served from /
Content not from webpack is served from ./src
404s will fallback to /index.html

webpack: Compiled successfully.
webpack: Compiling...

[1m[31mERROR in ./src/app/modules/main.module.ngfactory.ts
Module build failed: Error: ENOENT: no such file or directory, open 'E:\Angular2\angular2-aot-cli-webpack-plugin\src\app\modules\main.module.ngfactory.ts'
    at Error (native)
 @ ./src/app/main.ts 2:0-70
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./app/main.ts[39m[22m
webpack: Failed to compile.

rachitbhasin avatar Feb 28 '17 07:02 rachitbhasin

Same here with OS X. Clean install with yarn. Running npm start works for the first time, but fails on the next build:

ERROR in ./src/app/modules/main.module.ngfactory.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/xyz/tmp/angular2-aot-cli-webpack-plugin/src/app/modules/main.module.ngfactory.ts'
    at Error (native)
 @ ./src/app/main.ts 2:0-70
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./app/main.ts

rjokelai avatar Apr 08 '17 10:04 rjokelai

Is it still an issue with latest updates?

sonicoder86 avatar Oct 08 '17 10:10 sonicoder86