我正在使用vue 2.6.10
,并且在内部方法中,我尝试在行var area = document.getElementsByClassName('esri-area-measurement-3d__measurement-item-value')[0].innerHTML.split(" ")[0]
下运行,但出现以下错误:-
This dependency was not found:
* core-js/modules/es6.regexp.split in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_m
odules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Map.vue?vue&type=script&l
ang=js&
To install it, you can run: npm install --save core-js/modules/es6.regexp.split
但是,尽管运行npm install --save core-js/modules/es6.regexp.split
,我仍然遇到相同的错误
有人知道如何解决吗?
答案 0 :(得分:0)
对我来说,使用以下命令可以解决相同的错误:
工作方式:
"devDependencies": {
"@vue/cli-service": "^3.1.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0-0",
"vue-template-compiler": "^2.5.17"
}
此块中的最后3个条目(或者可能是某个子集?)似乎在哪里引起错误:
失败:
"devDependencies": {
"@vue/cli-service": "^3.1.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0-0",
"vue-template-compiler": "^2.5.17",
"@vue/cli-plugin-babel": "^3.1.1",
"@vue/cli-plugin-eslint": "^3.1.1",
"babel-eslint": "^10.0.1",
}