NPM ENOSELF错误-在其gh页分支中安装程序包 [英] npm ENOSELF error - installing a package in its gh-pages branch
本文介绍了NPM ENOSELF错误-在其gh页分支中安装程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在GitHub上使用LIB本身为JS LIB编写一些文档。我创建了一个名为gh-pages
的空分支,并开始构建文档页面。现在我需要使用我正在记录的LIB编写一些Java脚本,因为谁不会使用他们自己的库。我尝试通过npm install
安装,但明显收到以下错误:
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "package" under a package
npm ERR! also called "package". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
那么,我如何将代码库放入gh-pages
分支,而不是从主分支复制它?我不想在两个不同的分支中维护相同的代码库。
推荐答案
例如,我可以只重命名分支中的package.json
中的Package Name属性...
这篇关于NPM ENOSELF错误-在其gh页分支中安装程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文