node.js npm WARN [email protected] 需要 [email protected] - 3 的同级,但没有安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/54097328/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed
提问by Arul Suju
I tried to install bootstrap in my Angular Project by
我试图在我的 Angular 项目中安装引导程序
npm install --g bootstrap
npm install --g 引导程序
but i am getting following warning
但我收到以下警告
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 需要 [email protected] - 3 的同级,但没有安装。您必须自己安装对等依赖项。
npm WARN [email protected] 需要 popper.js@^1.14.6 的同级,但没有安装。您必须自己安装对等依赖项。
I am using following version of ng and npm
我正在使用以下版本的 ng 和 npm
Angular CLI: 7.1.4
Node: 10.15.0
OS: win32 x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.11.4
@angular-devkit/build-angular 0.11.4
@angular-devkit/build-optimizer 0.11.4
@angular-devkit/build-webpack 0.11.4
@angular-devkit/core 7.1.4
@angular-devkit/schematics 7.1.4
@ngtools/webpack 7.1.4
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1
采纳答案by Arul Suju
I resolved the above issue by running the npm command
我通过运行 npm 命令解决了上述问题
npm install --save bootstrap
npm install --save 引导程序
回答by Samir Sadek
Just do as it says:
只要按照它说的做:
npm i [email protected] --save
the option --save is to save this dependency to your project.
选项 --save 是将此依赖项保存到您的项目中。
回答by VigKam
回答by loka shafeek
In your package.json file search for "dependencies" and editing it to show as
在您的 package.json 文件中搜索“依赖项”并编辑它以显示为
"dependencies": {
//same lib
"jquery": "^1.9.1",
},
or run this command from cmd
或从 cmd 运行此命令
npm i [email protected] --save
npm i [email protected] --save
回答by Devang Solanki
I have resolved jQuery dependency with following steps in my react development project
我已经在我的 React 开发项目中通过以下步骤解决了 jQuery 依赖问题
npm install react-bootstrap bootstrap --save
npm audit fix --force
Result: found 0 vulnerabilities
结果:发现0个漏洞
It also fixes the issue, if another dependency is having issues.
如果另一个依赖项出现问题,它还可以解决此问题。
回答by Shahrukh Alam
just check the path where you are working:-
只需检查您正在工作的路径:-
$ pwd
$ pwd
if you are not in your project directory then type:
如果您不在项目目录中,请键入:
$ cd your-app
$ cd your-app
after checking all those above things than type:
在检查完上述所有内容后,请输入:
npm install --g bootstrap
npm install --g bootstrap

