1、报错情况

在执行npm install xxx时,出现如下:
npm WARN saveError ENOENT: no such file or directory, open '/nodetest1/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/nodetest1/package.json'

2、原因

项目目录中没有package.json

3、解决
使用 npm init -f 命令来生成一个package.json

4、生成package.json在执行npm install xxx

npm WARN nodetest1@1.0.0 No description
npm WARN nodetest1@1.0.0 No repository field.
npm WARN file-explorer@0.0.1 No repository field or no license field

5、显示缺少description描述和repository字段

根据模板package.json,添加description中的值以及repository字段
{
"name": "WeiXinNode",
"version": "1.0.0",
"description": "description字段",
"main": "index.js",
"dependencies": {
"koa": "^2.1.0",
"sha1": "^1.1.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"repository": { ------repository
"type": "",
"url": ""
},
}

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

  1. npm WARN saveError ENOENT: no such file or directory

    转自树之名原文npm WARN saveError ENOENT: no such file or directory解决 我是在安装sequelize时出错的.提示的错误没有保存,类似于参考的文章中 ...

  2. 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 错误提示: 解决办法: 生成一个 ...

  3. 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 ...

  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. 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 ...

  6. 解决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 ...

  7. 【应用服务 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>. ...

  8. 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\ ...

  9. ionic cordova platform add android Cordova failed to install plugin Error: ENOENT: no such file or directory AndroidManifest.xml

    问题描述: 在ionic 项目中出现编译android 的时候 出现 Cordova failed to install plugin  Error: ENOENT: no such file or ...

随机推荐

  1. Spring boot创建定时任务

    基于spring boot的应用创建定时任务不要太简单,给一个类加上@Configuration @EnableScheduling注解,然后给该类需要定时执行的方法加上@Scheduled(cron ...

  2. Day 25 多态.

    一.多态的概念 多态指的是一类事物有多种形态.动物有多种形态:人,狗,猪 from abc import ABCMeta,abstractmethod class Animal(metaclass=a ...

  3. 根据已有的Jar包 一键生成对应的mavenpom.xml信息

    根据已有的jar包信息一键生成对应的maven坐标信息 .想一个问题 假如 我有一个SSH的项目, jar包是配置在lib中, 我现在想把它做成maven格式的SSH项目  ,那么这些jar包在mav ...

  4. 石头剪刀布Java实现

    java实现石头剪刀布过程 首先来看石头剪刀布的所有可能情况,具体如下图 第一种思路是穷举所有可能,使用if条件语句,略显呆板和麻烦. 第二种思路,因为计算机存的是数字,所以我们可以从数字角度来找规律 ...

  5. extjs4.0以上添加多行工具栏的方法

    4.0.0起提供了dockedItems ,只要写两个dockItem,xtype为'toolbar',dock为 'top'即可

  6. 如何使不同时区的时间与京8区一致?(JS实现)

    如何使不同时区的时间与京8区一致?(JS实现) Update:2019/1/28 更简单的是使用这个函数(toDate): // 自定义日期格式如下(年月日都必须提供): // "2011- ...

  7. Android启动过程介绍

    开机过程大致可以分为以下三个阶段 OS级别 由bootloader载入linux kernel后,kernel开始初始化, 并载入built-in的驱动程序.Kernel完成开机后,载入init pr ...

  8. iOS---GCD的三种常见用法

    1.一次性代码:dispatch_once 有时候,有些代码在程序中只要被执行一次. 整个程序运行过程中,只会执行一次. - (void)viewDidLoad { [super viewDidLoa ...

  9. Web应用配置虚拟主机(www.baidu.com)

    最终效果:浏览器地址栏输入www.baidu.com访问时,会显示自己的网页 1.创建文件 任意盘新建一个www.baidu.com文件,在该文件夹下新建WEB-INF文件.自己写的一个html文件, ...

  10. 聚类系数可变无标度网络模型Holme-Kim HK模型

    # -*- coding: cp936 -*- import random import networkx as nx from networkx.generators.classic import ...