Currently, I am working on creating the min.js file for my Angular 2 project using Tree shaking. Previously, I did not encounter any errors because I was not utilizing ag-grid. However, after running npm run rollup, an error is now being displayed in the console. I am unsure whether this issue lies with my code or with the library itself. When inspecting the main.js file of ag-grid, it appears to be exporting the AgGridModule which has left me at a standstill.
Here is the error message:
Module /home/knoldus/yourManager/node_modules/ag-grid-ng2/main.js does not export AgGridModule (imported by /home/knoldus/yourManager/dist/temp/client/app/assets/asset.module.js)
Error: Module /home/knoldus/yourManager/node_modules/ag-grid-ng2/main.js does not export AgGridModule (imported by /home/knoldus/yourManager/dist/temp/client/app/assets/asset.module.js)
at Module.trace (/home/knoldus/yourManager/node_modules/rollup/src/Module.js:683:30)
at /home/knoldus/yourManager/node_modules/rollup/src/Module.js:265:30
at Array.forEach (native)
at /home/knoldus/yourManager/node_modules/rollup/src/Module.js:263:25
at Array.forEach (native)
at Module.bindReferences (/home/knoldus/yourManager/node_modules/rollup/src/Module.js:256:19)
at /home/knoldus/yourManager/node_modules/rollup/src/Bundle.js:104:44
at Array.forEach (native)
at /home/knoldus/yourManager/node_modules/rollup/src/Bundle.js:104:18
Type rollup --help for help, or visit https://github.com/rollup/rollup/wiki
npm ERR! Linux 4.4.0-36-generic
npm ERR! argv "/usr/local/bin/node" "/home/knoldus/npm/bin/npm" "run" "rollup"
npm ERR! node v6.2.2
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] rollup: `rollup -f iife -c -o dist/prod/client/app/bundle.es2015.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rollup script 'rollup -f iife -c -o dist/prod/client/app/bundle.es2015.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the yourmanager package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rollup -f iife -c -o dist/prod/client/app/bundle.es2015.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs yourmanager
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls yourmanager
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/knoldus/yourManager/npm-debug.log