sonicoder86 / angular2-aot-cli-webpack-plugin

Angular AOT (Ahead Of Time) compilation with Webpack plugin
40 stars 8 forks source link

Watch failes with error #1

Open rachitbhasin opened 7 years ago

rachitbhasin commented 7 years ago

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.

sonicoder86 commented 7 years ago

Does it work after upgrading deps? @rachitbhasin

rachitbhasin commented 7 years ago

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

> angular2-aot-cli-webpack-plugin@1.0.0 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...

ERROR 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
webpack: Failed to compile.
rjokelai commented 7 years ago

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
sonicoder86 commented 6 years ago

Is it still an issue with latest updates?