1、使用Vue框架的程序首先需要安装node.js,这是一个类似js的运行环境的东西,安装包地址为https://nodejs.org/zh-cn/,下载后直接运行安装,期间会运行powershell,不管安装期间出现啥,只要没出现error就没事,warning不用管!安装完成后,进入命令行输入 node -v以及npm -v,出现版本号即可! npm WARN config global --global, --local are deprecated. Use --location=global instead.这个不用管。

2、报错:npm ERR! code ENOENT npm ERR! syscall open npm ERR! path E:\Yolov5-Flask-VUE-master 修改/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open ‘E:\Yolov5-Flask-VUE-master 修改\package.json’ npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\22901\AppData\Local\npm-cache_logs\2022-07-22T11_37_15_019Z-debug-0.log 你需要到有Vue工程的package.json包的目录下运行npm install,运行即可!

3、nodejs 执行 npm install 时报错 “Cannot read properties of null (reading ‘pickAlgorithm‘)”

解决方法:执行npm cache clear --force清除缓存再重新执行npm install

PS:每当Vue工程文件换目录时,都要重新安装依赖,即重新运行npm install,如果报上

好文阅读

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: