Module build failed (from ./node_modules/@ngtools/webpack/src/index.js)
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @ngtools/webpackIs this a regression?
No.Description
A clear and concise description of the problem...After updating angular version 8 to 9, when I try to execute the commands ionic serve or ng serve I get the compilation error.
π₯ Exception or Error
[ng] ERROR in ./src/zone-flags.ts
[ng] Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
[ng] Error: /home/mejia97/Documentos/CTM/ctm-front/src/zone-flags.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
[ng] at AngularCompilerPlugin.getCompiledFile (/home/mejia97/Documentos/CTM/ctm-front/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:909:23)
[ng] at /home/mejia97/Documentos/CTM/ctm-front/node_modules/@ngtools/webpack/src/loader.js:41:31
[ng] at runMicrotasks (<anonymous>)
[ng] at processTicksAndRejections (internal/process/task_queues.js:97:5)
π Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.1
Node: 13.7.0
OS: linux x64
Angular: 9.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.1
@angular-devkit/build-angular 0.900.1
@angular-devkit/build-optimizer 0.900.1
@angular-devkit/build-webpack 0.900.1
@angular-devkit/core 9.0.1
@angular-devkit/schematics 9.0.1
@angular/cli 9.0.1
@angular/fire 5.4.2
@ngtools/webpack 9.0.1
@schematics/angular 8.1.3
@schematics/update 0.900.1
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
16 - Stack Overflow
main.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-es2015' fromΒ ...
Read more >Bug Report - GitHub
Bug Report Current Behavior when i try to run the command npm start i get that error : ERROR in ./main.js Module build...
Read more >Angular - Code with Mosh Forum
Error : Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Β· delete the node_modules folder Β· delete package-lock.jsonΒ ...
Read more >Get Help and Help Others - RedwoodJS Community
Compiled with problems:X ERROR in ./src/components/Button/Button.tsx Module build failed (from ../node_modules/babel-loader/lib/index.js):.
Read more >Sign in - YouTube
Module build failed (from ./node_modules/source-map-loader/dist/cjs. js ): Error: ENOENT: no such file or directory,Β ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems likezone-flags.tsis not part of the compilation, iszone-flagsanother entrypoint? Most likely this file needs to be added in thefilessection of yourtsconfig.app.jsonEdit: most likely in
polyfills.tsyou have an import with an extension. Ex:import './zone-flags.ts'. Removing the extension should solve the issue.@rtpHarry, I actually update the comment, as the root cause seems to be an import with a
.tsextension.