在迁移三个依赖的时候 报错了 报错内容是让我再安装一次依赖 视频没说要安装啊

来源:2-2 入口文件迁移及 webpack 配置变更方式

小丸子不吃丸子

2021-02-05 18:44:01

http://img.mukewang.com/climg/601d20cc09fe948111900245.jpg

新版本路径已经更改了

http://img.mukewang.com/climg/601d21410984dcd310690548.jpg

新版本package.json也安装了

http://img.mukewang.com/climg/601d216e094062df10700660.jpg


如下cmd代码

Microsoft Windows [版本 10.0.18363.1316]

(c) 2019 Microsoft Corporation。保留所有权利。


C:\Users\Administrator>cd Travel

系统找不到指定的路径。


C:\Users\Administrator>cd travel

系统找不到指定的路径。


C:\Users\Administrator>cd desktop


C:\Users\Administrator\Desktop>ce travel

'ce' 不是内部或外部命令,也不是可运行的程序

或批处理文件。


C:\Users\Administrator\Desktop>cd travel


C:\Users\Administrator\Desktop\Travel>npm install


> core-js@3.8.3 postinstall C:\Users\Administrator\Desktop\Travel\node_modules\core-js

> node -e "try{require('./postinstall')}catch(e){}"


Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!


The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

> https://opencollective.com/core-js

> https://www.patreon.com/zloirock


Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)



> ejs@2.7.4 postinstall C:\Users\Administrator\Desktop\Travel\node_modules\ejs

> node ./postinstall.js


Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)


npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})


added 1221 packages from 933 contributors and audited 1227 packages in 100.418s


61 packages are looking for funding

  run `npm fund` for details


found 0 vulnerabilities



C:\Users\Administrator\Desktop\Travel>npm run serve


> travel@0.1.0 serve C:\Users\Administrator\Desktop\Travel

> vue-cli-service serve


 INFO  Starting development server...

98% after emitting CopyPlugin


 DONE  Compiled successfully in 9567ms                                                                       下午6:33:03



  App running at:

  - Local:   http://localhost:8080/

  - Network: http://192.168.1.16:8080/


  Note that the development build is not optimized.

  To create a production build, run npm run build.




 WAIT  Compiling...                                                                                          下午6:37:33


98% after emitting CopyPlugin


 ERROR  Failed to compile with 6 errors                                                                      下午6:37:35


These dependencies were not found:


* fastclick in ./src/main.js

* styles/border.css in ./src/main.js

* styles/iconfont.css in ./src/main.js

* styles/reset.css in ./src/main.js

* swiper/dist/css/swiper.css in ./src/main.js

* vue-awesome-swiper in ./src/main.js


To install them, you can run: npm install --save fastclick styles/border.css styles/iconfont.css styles/reset.css swiper/dist/css/swiper.css vue-awesome-swiper

Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'



 WAIT  Compiling...                                                                                          下午6:37:36


98% after emitting CopyPlugin


 ERROR  Failed to compile with 6 errors                                                                      下午6:37:39


These dependencies were not found:


* fastclick in ./src/main.js

* styles/border.css in ./src/main.js

* styles/iconfont.css in ./src/main.js

* styles/reset.css in ./src/main.js

* swiper/dist/css/swiper.css in ./src/main.js

* vue-awesome-swiper in ./src/main.js


To install them, you can run: npm install --save fastclick styles/border.css styles/iconfont.css styles/reset.css swiper/dist/css/swiper.css vue-awesome-swiper



 WAIT  Compiling...                                                                                          下午6:41:26


98% after emitting CopyPlugin


 ERROR  Failed to compile with 3 errors                                                                      下午6:41:27


These dependencies were not found:


* fastclick in ./src/main.js

* swiper/dist/css/swiper.css in ./src/main.js

* vue-awesome-swiper in ./src/main.js


To install them, you can run: npm install --save fastclick swiper/dist/css/swiper.css vue-awesome-swiper

Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'



 WAIT  Compiling...                                                                                          下午6:45:06


98% after emitting CopyPlugin


 ERROR  Failed to compile with 2 errors                                                                      下午6:45:06


These dependencies were not found:


* swiper/dist/css/swiper.css in ./src/main.js

* vue-awesome-swiper in ./src/main.js


To install them, you can run: npm install --save swiper/dist/css/swiper.css vue-awesome-swiper

 


写回答

1回答

好帮手慕言

2021-02-05

同学你好,把旧项目文件中的如下代码放到新项目之后,有没有运行cnpm i呢?

http://img.mukewang.com/climg/601d28a409a1df1904770147.jpg

如果没有运行的话,建议运行一下,如果运行了cnpm i之后报同学所提供的错误,可能是没有安装好,建议运行下方命令再安装一下:

npm i vue-awesome-swiper@2.6.7  --save

​祝学习愉快~

0

0 学习 · 10739 问题

查看课程