Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Unable to fully load /node_modules/ag-grid-angular/main.js for source-map flattening

I am getting the following warning when I am building the application with Angular Cli version 9.1.7 with enableIvy. I am using ag-grid-community version 22.1.0.

Warning: Unable to fully load /node_modules/ag-grid-angular/main.js for source-map flattening: ENOENT: no such file or directory, open '/node_modules/ag-grid-angular/exports.js.map

Application is running fine but still like to know, is this issue from ag-grid side? I didn't check ag-grid 23 version, so can this issue be resolved or not arise on the latest version. Thoughts..

like image 458
Sanj Avatar asked Jun 03 '20 08:06

Sanj


3 Answers

Deleting the node_modules and having the folder recreated automatically by running "npm install" did it for me.

like image 145
Pierre Chew Avatar answered Nov 11 '22 13:11

Pierre Chew


For me, the command npm dedupe solved the problem.

Description of npm dedupe

Searches the local package tree and attempts to simplify the overall structure by moving dependencies further up the tree, where they can be more effectively shared by multiple dependent packages.

https://docs.npmjs.com/cli/dedupe

like image 16
Michael Mairegger Avatar answered Nov 11 '22 12:11

Michael Mairegger


My experience and https://github.com/angular/angular/issues/35757 suggest deleting node_modules folder and package-lock.json file fixes this issue.

like image 8
Spikolynn Avatar answered Nov 11 '22 12:11

Spikolynn