一个网站建设花了10万元,seo网站,网站架构发展历程的思考和心得体会,沈阳企业网站建设公司从gitee克隆VUE项目到本地后#xff0c;不能直接运行#xff0c;需要进行npm install安装node_modules文件夹里面的内容#xff0c;因为在git上传的时候#xff0c;一般都会过滤到node_modules中的依赖文件。 安装依赖以后#xff0c;启动通过npm run serve启动项目出错。…从gitee克隆VUE项目到本地后不能直接运行需要进行npm install安装node_modules文件夹里面的内容因为在git上传的时候一般都会过滤到node_modules中的依赖文件。 安装依赖以后启动通过npm run serve启动项目出错。 PS C:\Users\Administrator\Desktop\VueStudy npm run serve npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\Administrator\Desktop\VueStudy\package.json npm ERR! errno -4058 npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open C:\Users\Administrator\Desktop\VueStudy\package.json npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! Log files were not written due to an error writing to the directory: D:\node\node_cache\_logs npm ERR! You can rerun the command with --loglevelverbose to see the logs in your terminal 解决办法
因为我的项目里面有2层文件夹启动项目的时候没有在package.json的同级目录启动所以出现了上面的错误将启动目录切换到 package.json的同级目录在run就成功了。