npm WARN saveError ENOENT: no such file or directory解决
程序员文章站
2022-03-03 17:39:18
...
安装完成node.js后使用npm安装vue报错如下:
-
C:\Users\lxz>npm uninstall vueWcsp
-
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\lxz\package.json'
-
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\lxz\package.json'
-
npm WARN lxz No description
-
npm WARN lxz No repository field.
-
npm WARN lxz No README data
-
npm WARN lxz No license field.
-
up to date in 0.765s
根据错误提示,是系统没有‘package.json’这个文件导致。这个文件的作用就是管理你本地安装的npm包,一个package.json文件可以做如下事情:
展示项目所依赖的npm包
允许你指定一个包的版本[范围]
让你建立起稳定,意味着你可以更好的与其他开发者共享
此刻我们需要执行命令:
npm init
创建package.json文件,系统会提示相关配置,也可以使用命令:
npm init -y
直接创建package.json文件,这样创建好处是必填项已经帮你填好,执行完命令后可以看到用户路径下多了一个package.json文件。
推荐阅读
-
nmp安装报错npm ERR errno -4058,npm ERR enoent ENOENT: no such file or directory, open
-
NPM项目运行出现安装node-sass报错Error: ENOENT: no such file or directory, scandir
-
【webpac】npm ERR! enoent ENOENT: no such file or directory, open ‘E:\DEMO\webpack的使用-v2\package.json‘
-
cnpm安装报错 npm ERR! enoent ENOENT: no such file or directory, access 'D:\Develop\nodejs\node_global……
-
npm install命令运行中出现Error: ENOENT: no such file or directory解决方法
-
npm WARN enoent ENOENT: no such file or directory, open 'D:\····\package.json(找不到package.json)...
-
npm报错Error: ENOENT: no such file or directory
-
npm安装模块遇到ENOENT: no such file or directory, rename错误
-
安装RocketChat报错:npm WARN saveError ENOENT: no such file or directory, open ‘/tmp/bundle/programs/web.
-
FAQ:NodeJS安装报错npm WARN saveError ENOENT: no such file or directory, open 'G:\Node\package.json'