macOS 10.12.1
Node 4.5 - no CLI usage
My app was unchanged - I upgraded from Angular 2.2.4 to 2.4.0, and @ngtools/webpack from 1.1.9 to 1.2.1
The only error message is
ERROR in Could not resolve "src/app/app.aot.module.ts" from "src/app/app.aot.module.ts".
No stack trace present, and everything else seems to compile fine.
Cross-linking https://github.com/angular/angular/issues/13613 with more details
was running into a similar issue, if you have cli beta 24 try using the angular version 2.3.1 if you look at the cli package.json they're using below.
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/forms": "^2.3.1",
"@angular/http": "^2.3.1",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
"@angular/router": "^3.3.1",
"core-js": "^2.4.1",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
i tried running with 2.4.0 and it failed saw many people having the same issue, and downgraded angular to 2.3.1 now it works no problem.
I am not using the CLI. I do use Webpack, and am using @ngtools/webpack.
This appears to be a @ngtools/webpack bug, as using raw ngc works flawlessly (when all webpack specific things are removed - in my case, we use scss so I had to remove it from every component in order to verify that ngc works).
Same here.
ERROR in Could not resolve module ./index.ts relative to /application/index.ts
Raw ngc ist working also flawlessly, but with @ngtools/webpack i'm getting the error above.
Deps:
"@angular/common": "2.4.1",
"@angular/compiler": "2.4.1",
"@angular/compiler-cli": "2.4.1",
"@angular/core": "2.4.1",
"@angular/forms": "2.4.1",
"@angular/http": "2.4.1",
"@angular/platform-browser": "2.4.1",
"@angular/platform-browser-dynamic": "2.4.1",
"@angular/platform-server": "2.4.1",
"@angular/router": "3.4.1",
"@ngtools/webpack": "^1.2.0"
Any progress or workaround on this issue?
Found a workaround, use full path to entryModule in webpack.config.js.
plugins: [
new AotPlugin({
tsConfigPath: 'path/to/tsconfig.json',
entryModule: __dirname + '/app.module#AppModule'
})
]
I confirm that @linusfoldemo 's workaround works for me too. Thanks!
I have the same problem, it used to work with a relative path in entryModule. @linusfoldemo ' s workaround works for me.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
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._
Most helpful comment
Found a workaround, use full path to entryModule in webpack.config.js.