引入:
报错如图:
Error in mounted hook: "TypeError: Cannot read property 'init' of undefined"
于是搜索问题,说是echarts的版本太高,新版本不稳定。于是卸载 echarts, 结果报错
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: cp@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^3.6.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^5.0.0" from less-loader@9.1.0
npm ERR! node_modules/less-loader
npm ERR! dev less-loader@"^9.0.0" from the root project
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! See D:\NDjs\node_cache\eresolve-report.txt for a full report.
好像是 npm版本(6.14.14)太低,于是升级npm(7.0.0)后,再次卸载,依然报错!
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: cp@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^3.6.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^5.0.0" from less-loader@9.1.0
npm ERR! node_modules/less-loader
npm ERR! less-loader@"^9.0.0" from the root project
现在又蒙了,不知道咋弄。我该咋办,求解