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

3

14

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..

Alexandria answered 3/6, 2020 at 8:25 Comment(3)
this issue is still happening for angular version 9.1.11. The warning is coming during the compilation of typescript sources through ngc. The following message is showing on the console "Compiling ag-grid-angular : main as commonjs" then the warning is coming.Alexandria
Different from this context, another warning is coming during ng build "Warning: Entry point 'ngx-papaparse' contains deep imports into '/node_modules/papaparse/papaparse.min.js'. This is probably not a problem, but may cause the compilation of entry points to be out of order. " but this issue is already recognized by ngx-papaparse stakeholders and they are already in the process to fix it.Alexandria
I'm getting this error with different dependencies and with Angular 11Sergu
A
18

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

Aeromechanics answered 31/7, 2020 at 12:35 Comment(1)
Thank you for this answer, it helped me to fix a very critical migration warning issues in my project! this question should be marked as SolvedTeary
T
8

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

Trometer answered 29/6, 2020 at 10:59 Comment(4)
I'm seeing the same warning. It seems that everything is working, but I would like to get rid of this warning....Gadgetry
Yeah it seems after runing ng update --all the warnings came back. Re-deleting node_modules and package-lock cleared the warnings but it is not a viable solution for me :/Trometer
Actually we can see this warning during ng build after fresh npm install. This will happen only when we build with ivy compiler, during this process ivy compiler compiles all those packages to esm5/esm2015Alexandria
@Alexandria I had the same issue exactly after a fresh npm install. The second time doing ng build has no warningsAntler
R
1

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

Revis answered 21/1, 2021 at 19:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.