You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot find module './applySourceMap' on ng serve or ng build #16493
If I use ng serve or ng build, I get the following error message: An unhandled exception occurred: Cannot find module './applySourceMap' See "C:\Users\[USER]\AppData\Local\Temp\ng-aEMkei\angular-errors.log" for further details.
🔬 Minimal Reproduction
🔥 Exception or Error
[error] Error: Cannot find module './applySourceMap'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\[USER]\source\repos\[PROJECT]\Angular_nstt\node_modules\webpack-sources\lib\SourceMapSource.js:13:22)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
You may have a corrupted install. The JavaScript file in question (applySourceMap.js) should be located adjacent to the SourceMapSource.js mentioned in the stack trace. (package contents)
Can you check whether the file applySourceMap.js is present in the node_modules\webpack-sources\lib\ directory?
Also it may be useful to try deleting the node_modules directory and lock file and then re-installing. If the problem persists, removing the local npm cache prior to the re-install may help (npm cache clean --force).
You may have a corrupted install. The JavaScript file in question (applySourceMap.js) should be located adjacent to the SourceMapSource.js mentioned in the stack trace. (package contents)
Can you check whether the file applySourceMap.js is present in the node_modules\webpack-sources\lib\ directory?
Also it may be useful to try deleting the node_modules directory and lock file and then re-installing. If the problem persists, removing the local npm cache prior to the re-install may help (npm cache clean --force).
Thanks, @clydin, applySourceMap.js was missing in the directory node_modules\webpack-sources\lib\.
Now its working fine when deleting `node-modules' and lock file and then reinstalling
Activity
sacgrover commentedon Dec 24, 2019
Seems like. You didn't import applySourceMap module into App Module
alan-agius4 commentedon Dec 27, 2019
Hi @blakeghowe, this might be caused by a package manger hosting issue. I am seeing also a number of package versions which are not aligned.
Can you update your
@angular/cliversion to^8.3.21and try again?philoj commentedon Dec 31, 2019
@alan-agius4 Having same issue here. I updated the cli to 8.3.21, still having the issue
@blakeghowe did you find a solution?
alan-agius4 commentedon Dec 31, 2019
Can you run
npm ls webpack-sources?frontend-stunntech commentedon Jan 1, 2020
Hi @alan-agius4 ,
I get the following
└─┬ @angular-devkit/build-angular@0.803.21
├─┬ @angular-devkit/build-optimizer@0.803.21
│ └── webpack-sources@1.4.3 deduped
├─┬ @ngtools/webpack@8.3.21
│ └── webpack-sources@1.4.3 deduped
├─┬ license-webpack-plugin@2.1.2
│ └── webpack-sources@1.4.3 deduped
├─┬ mini-css-extract-plugin@0.8.0
│ └── webpack-sources@1.4.3 deduped
├─┬ terser-webpack-plugin@1.4.3
│ └── webpack-sources@1.4.3 deduped
├─┬ webpack@4.39.2
│ └── webpack-sources@1.4.3 deduped
└── webpack-sources@1.4.3
clydin commentedon Jan 3, 2020
You may have a corrupted install. The JavaScript file in question (
applySourceMap.js) should be located adjacent to theSourceMapSource.jsmentioned in the stack trace. (package contents)Can you check whether the file
applySourceMap.jsis present in thenode_modules\webpack-sources\lib\directory?Also it may be useful to try deleting the
node_modulesdirectory and lock file and then re-installing. If the problem persists, removing the local npm cache prior to the re-install may help (npm cache clean --force).frontend-stunntech commentedon Jan 3, 2020
Thanks, @clydin,
applySourceMap.jswas missing in the directorynode_modules\webpack-sources\lib\.Now its working fine when deleting `node-modules' and lock file and then reinstalling
filipesilva commentedon Jan 3, 2020
Glad to hear it's sorted, I'll close the issue then.
angular-automatic-lock-bot commentedon Feb 3, 2020
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.