title: npm missing package.json
type: categories
date: 2016-12-30 16:58:57
categories: npm
tags: [npm,package,WARN]
在执行
npm install <模块>
时,出现找不到文件路径package.json
等报错。
报错
zhangzhao:util zhangzhao$ npm install n-crypto
/Users/zhangzhao
└── n-crypto@0.2.1
npm WARN enoent ENOENT: no such file or directory, open '/Users/zhangzhao/package.json'
npm WARN zhangzhao No description
npm WARN zhangzhao No repository field.
npm WARN zhangzhao No README data
npm WARN zhangzhao No license field.
解决
npm install -g --save n-crypto