npm 安装本地包

npm install ../xxx 就行

如果报错,比如

1`Refusing to install  as a dependency of itself

  说明你的本地模块没npm init ,也就是没有name/version 之类的

本地包强制重新安装

npm install ../xxx -f  (只是单纯安装(install)或更新(update)没用,因为version没变)

3关于cache 

如果你把某个本地包的cache给清了,那你在install 回报没有这个包,所以得用 cache add 给加回来

原文地址:https://www.cnblogs.com/so-letitgo/p/5815613.html