0

Earlier my application was working fine but after doing npm audit fix I'm getting this error:

Failed to compile.

./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/jit-polyfills.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@angular-devkit\build-angular\src\angular-cli-files\models\jit-polyfills.js'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Storage.provideSync (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:109:13)
    at CachedInputFileSystem.readFileSync (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:289:32)
    at Observable._subscribe (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@ngtools\webpack\src\webpack-input-host.js:36:51)
    at Observable._trySubscribe (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\rxjs\internal\Observable.js:30:22)
    at SyncDelegateHost._doSyncCall (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:25:20)
    at SyncDelegateHost.read (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:48:21)
    at WebpackCompilerHost.readFileBuffer (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@ngtools\webpack\src\compiler_host.js:166:44)
    at VirtualFileSystemDecorator.readFile (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:43:54)
    at processResource (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\loader-runner\lib\LoaderRunner.js:202:11)
    at iteratePitchingLoaders (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\loader-runner\lib\LoaderRunner.js:158:10)
    at runLoaders (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\loader-runner\lib\LoaderRunner.js:365:2)
    at NormalModule.doBuild (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\webpack\lib\NormalModule.js:295:3)
    at NormalModule.build (C:\Users\mynkk\OneDrive\Desktop\Data\Projects\humlist\node_modules\webpack\lib\NormalModule.js:446:15)

I tried to find the solution but didn't got any. I reinstalled angular-devkit with npm install --save-dev @angular-devkit/build-angular but still facing the same issue. What am I missing here?

Mayank Kataria
  • 870
  • 2
  • 12
  • 22

1 Answers1

1

I solved this problem by downgrading "@angular-devkit/build-angular" version to "~0.1000.0"

Mayank Kataria
  • 870
  • 2
  • 12
  • 22