After updating my NPM packages, this application stopped working and started throwing the following errors:
**Error Message #1** Uncaught (in promise) TypeError: Cannot read property 'call' of undefined at o (fusioncharts.js:13) at o.t (fusioncharts.js:13) **Error Message #2** Uncaught Error: #90211 ExtensionName Error >> A FusionCharts extension must have a getName API or a name property. at o (fusioncharts.js:13) at Function.i (fusioncharts.js:13) at Function.e.addDep (fusioncharts.js:13) at fusioncharts.js:13
The Error #1 appears once, and Error #2 happens about 30x, until it crashes the app.
Things I tried
- Lots of googling about these errors, very little information came up; searched SO and found nothing about these specific errors.
- I thought the errors might mean the CDN for FusionCharts was corrupted, so I replaced the CDN and refreshed (tried several options); no change.
- I also considered that a global variable may be messing something up, but I double-checked and all of my required dependencies are in the package.json.
- I thought it might be related to package managers, so I tried running “NPM install” and “Yarn install” to refresh packages. Nothing.
Does anyone have any ideas about these errors? Or other things I can try?
Advertisement
Answer
Solved
This was a package management issue. I was using NPM and Yarn together (known to be risky), and I accidentally used “npm install” to refresh the packages instead of “yarn install”. This scrambled the yarn tree for my local environment, creating dependency gaps. I tried “yarn install”, but by then it was too late (detailed explanation here)
To fix this, you need to reset your local environment.
Steps I took to resolution:
1. Delete node & yarn and local repository 2. Reinstall node & yarn and download repo 3. Run "yarn install" (builds the dependency tree) 4. Run "yarn start" or "yarn dev"
I’m very relieved this worked. I hope this is helpful, please comment for more detail.