node.js - What may I be missing while trying to install npm bootstrap to my project?
问题描述
I am trying to use npm to install bootstrap on my project. I have already
npm init
and confirmed package.json is on the associated folder. However,npm install bootstrap
keeps bringing a dependency error npm ERR! code ENOSELF npm ERR! Refusing to install package with name "bootstrap" under a package npm ERR! also called "bootstrap". 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
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2021-07-30T11_18_57_954Z-debug.log
How do I fix this error pls?
解决方案
您可能将您的包命名为bootstrap
,这可以防止从注册表中npm
安装同名的包。尝试将您的包重命名bootstrap-test
为package.json
:
{
"name": "bootstrap-test",
"version": "0.1.0",
"description": "My first bootstrap project!"
}
推荐阅读
- c++ - 将带有非 const 元素的 shared_ptr 向量转换为带有 const 元素的 shared_ptr 向量
- reactjs - 无法使用reactjs更改头像中的图像
- python - 使用 Python 将长文本序列分割成段落
- python - GraphQL 错误:int() 参数必须是字符串或数字,而不是“列表”
- r - 将每行值更改为值为 1 的 rowsum-1 的更快代码
- c# - 您可以将使用 SQL Server 的整个正在运行的 C# 项目从简单的 BLOB 更改为 FileStream 并同时使用它们吗?
- graphql - 如何在 Apollo GraphQL Server 中加入两个 REST 数据源?
- android - 使用 MediaCodec 编码器后音频中出现噪音,在某些设备上出现
- python - 如何修复它''给定输入大小:(64x176x64)。计算的输出大小:(64x1x0)。输出尺寸太小''
- python - 如何使用 Click CLI 添加选项并将选项正确传递给函数?