转自树之名原文npm WARN saveError ENOENT: no such file or directory解决

我是在安装sequelize时出错的。提示的错误没有保存,类似于参考的文章中说的安装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文件。

然后,再在cmd中输入 npm install --save sequelize,之后package.json文件下便有了相关记录。

npm WARN saveError ENOENT: no such file or directory的更多相关文章

  1. npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\James\package.json'

    在运行如下命令时, 遇到了问题: npm install --registry=https://registry.npm.taobao.org npm run dev 错误提示: 解决办法: 生成一个 ...

  2. npm install报错类似于npm WARN tar ENOENT: no such file or directory, open '***\node_modules\.staging\***

    报错类似于如下图 解决方法: 删除文件 package-lock.json,再重新执行npm i或者npm install

  3. npm saveError ENOENT: no such file or directory

    1.报错情况 在执行npm install xxx时,出现如下:npm WARN saveError ENOENT: no such file or directory, open '/nodetes ...

  4. npm安装socket.io时报错的解决方法(npm WARN enoent ENOENT: no such file or directory, open '/usr/local/nodejs/bin/package.json')

    执行 npm install socket.io安装时报错: [root@WEB node_modules]# npm install socket.ionpm WARN enoent ENOENT: ...

  5. npm install报错 npm ERR! enoent ENOENT: no such file or directory

    在npm之后出现如下错误: $ npm install npm WARN checkPermissions Missing write access to /Users/lucas/code/js/v ...

  6. cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,

    1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://reg ...

  7. 解决Error: ENOENT: no such file or directory, scandir 'D:\IdeaWork\code-front-jet\node_modules\.npminstall\node-sass\3.7.0\node-sass\vendor'

    在使用npm安装node-sass的时候,可能会出现如下的报错: Error: ENOENT: no such file or directory, scandir 'D:\IdeaWork\code ...

  8. 【应用服务 App Service】NodeJS +Egg 发布到App Service时遇见 [ERR_SYSTEM_ERROR]: A system error occurred:uv_os_get_passwd returned ENOENT(no such file or directory)

    问题情形 本地NodeJS应用使用Egg脚手架构建,本地运行测试完全没有问题,发布后App Service后不能运行.通过登录到kudu后(https://<your web site>. ...

  9. gitbook build/serve 失败,Error: ENOENT: no such file or directory, stat ...

    我使用的 gitbook 版本 CLI version: 2.3.2 GitBook version: 3.2.3 在使用 gitbook 生成文档时,发现编译偶尔不规律性地出现错误 d:\Mine\ ...

随机推荐

  1. Babel(抽象语法树,又称AST)

    文章:https://juejin.im/post/5a9315e46fb9a0633a711f25 https://github.com/jamiebuilds/babel-handbook/blo ...

  2. MySQL Replication Report

    很多人都会MySQL主从框架的搭建,但很多人没有真正理解同步基本用途.同步的基本原理,还有当Master和Slave同步断开后的处理以及导致Master和slave不同步的原因等等,当你对这些都了如指 ...

  3. extjs6入门:用sencha cmd搭建简单的extjs6项目

    开发准备 1.sencha cmd安装 2.extjs6.0.0 gpl正式版下载,地址:https://www.sencha.com/legal/gpl/ ,解压ext-6.0.0-gpl.zip ...

  4. NET-知识点:C#中Equals和==比较

    第一.相等性比较 其实这个问题的的本质就是C#的相等比较,相等比较可以分两类: 1.引用相等性,引用相等性指两个对象引用均引用同一基础对象. 2.值相等性,值相等性指两个对象包含相同的一个或多个值,其 ...

  5. GitLab备份的创建与恢复

    使用Gitlab一键安装包安装Gitlab非常简单, 同样的备份恢复与迁移也非常简单. 使用一条命令即可创建完整的Gitlab备份: gitlab-rake gitlab:backup:create使 ...

  6. linux环境vnc安装

    环境:centos6.9 背景:有时安装软件图形化方便操作 1.安装vnc服务端 yum install tigervnc-server -y 2.修改vncserver的配置文件.命令:vim /e ...

  7. java学习之租车系统

    ​背景:有三种类型的车供给用户来租用​ ​要求:控制台用户交互界面,根据用户需求输出租车价格,结果如下: 创建租车类主要设计过程: 创建租车类 创建Car父类,包含四种属性成员,重写构造方法 创建三种 ...

  8. 001.etcd简介及单节点使用

    一 etcd简介 1.1 概述 etcd 是 CoreOS 团队发起的开源项目,是一个管理配置信息和服务发现(service discovery)的项目,它的目标是构建一个高可用的分布式键值(key- ...

  9. mybatis generator修改默认生成的sql模板

    相关连接: mybatis-generator扩展教程系列 -- 自定义sql xml文件 git项目地址

  10. Beta冲刺准备

    过去存在的问题: 界面不够美观 推荐不够人性化 代码不够符合开闭原则 我们已经做了哪些调整/改进: 本来想引入springAndroid,但看了下google的官方文档,不建议引入第三方框架:代码重构 ...