npm ERR! code ENOENTnpm ERR! syscall open

新建了一个vue项目,终端npm install时报错

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\Workspaces\yygh/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\Workspaces\yygh\package.json'
npm ERR! enoent This is related to npm not being able to find a file.

解决方法:先进入package.json对应的最近一级父文件夹再npm install

你可能感兴趣的:(前端,npm,vue.js,前端)