ERROR Failed to compile with 3 errors找不到依赖项

ERROR  Failed to compile with 3 errors

These dependencies were not found:

* core-js/modules/es6.number.constructor in ./node_modules/[email protected]@el-select-tree/lib/index.js
* style-inject/dist/style-inject.es.js in ./node_modules/[email protected]@el-select-tree/lib/index.js
* vue-runtime-helpers/dist/normalize-component.js in ./node_modules/[email protected]@el-select-tree/lib/index.js

To install them, you can run: npm install --save core-js/modules/es6.number.constructor style-inject/dist/style-inject.es.js vue-runtime-helpers/dist/normalize-component.js

百度下来结果和报错的提示信息一直,所以尝试一下

cnpm install core-js

npm install --save core-js

[email protected]

--save 安装的话
会写入package.json中
在package.json中可以看到依赖包
不用 --save的话
是不会写入package.json中的
package.json中看不到依赖包

反正各种折腾,最终卸载了全部的包括全局的vue包,删除了所有的node_moudules文件夹,最后自己莫名其妙就好了,总之,肯定是缓存的问题不是代码的问题。

全部删除缓存,重新install了一下 core-js就好了

小伙伴们碰到这个问题多尝试。

你可能感兴趣的:(vue相关开发,vue.js,javascript,前端)