我在Visual Studio中工作并尝试从VS中嵌入的CLI安装bootstrap。
PS C:\inetpub\wwwroot\helloWorld> npm install --save bootstrap
我收到以下消息,我认为这是一个错误。我不知道它意味着什么,我想知道如何前进。
hello-world@0.0.0 C:\inetpub\wwwroot\helloWorld
+-- UNMET PEER DEPENDENCY @angular/compiler@5.0.1
+-- UNMET PEER DEPENDENCY @angular/core@5.0.1
`-- bootstrap@3.3.7
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0
(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
npm WARN codelyzer@3.2.2 requires a peer of @angular/compiler@^2.3.1 ||
>=4.0.0-beta <5.0.0 but none was installed.
npm WARN codelyzer@3.2.2 requires a peer of @angular/core@^2.3.1 ||
>=4.0.0-beta <5.0.0 but none was installed.
答案 0 :(得分:0)
(1)您可以通过检查package.json
中是否有条目来检查是否已安装bootstrap。通过在angular-cli.json中提供bootstrap.min.css
或bootstrap.min.js
的路径,可以轻松使用它们。
(2)此外,当您通过npm
安装时,会在节点模块中创建一个文件夹。
每当您通过npm
安装任何内容时,可能会有一些warn
消息,但它们没有任何效果,也不能被视为错误&#39;。