安装better-scroll后项目报错不能启动

ERROR Failed to compile with 3 errors 14:29:41

These dependencies were not found:

* core-js/modules/es.array.includes in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/top.vue?vue&type=script&lang=js&

* core-js/modules/es.function.name in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/top.vue?vue&type=script&lang=js&

* core-js/modules/es.object.to-string in ./src/router/index.js

报这个错,缺少core-js模块的包

我:???????

好好安装个better-scroll 你给我整这么多错?

重新 npm install 无效

 更新npm >   npm install npm -g  无效

找出package.json 的文件 把我安装的betterscroll 那一行删掉也不行

查看svn  发现 package-lock.json 里的有关core-js的模块少了三行

后重新安装了 core-js

npm install core-js

  就好了,又能run起来了 ,谢天谢地


原文链接:

https://www.cnblogs.com/czrb/p/10757731.html

你可能感兴趣的:(安装better-scroll后项目报错不能启动)