简体   繁体   English

Popper.js 未安装

[英]Popper.js not getting installed

I recently created an angular project and am trying to install popper.js but not getting installed.我最近创建了一个 angular 项目,正在尝试安装 popper.js 但没有安装。

ng new <<project>>
cd <<project>>
npm install popper --save

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 npm WARN 可选跳过可选依赖:fsevents@^1.0.0

(node_modules\\rijs.resdir\\node_modules\\chokidar\\node_modules\\fsevents): (node_modules\\rijs.resdir\\node_modules\\chokidar\\node_modules\\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for

fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: fsevents@1.2.11:想要 {"os":"darwin","arch":"any"}(当前:

{"os":"win32","arch":"x64"}) npm ERR! {"os":"win32","arch":"x64"}) npm ERR! code ENOENT npm ERR!代码 ENOENT npm ERR! syscall系统调用

spawn git npm ERR!生成 git npm ERR! path git npm ERR!路径 git npm ERR! errno ENOENT npm ERR! errno ENOENT npm 错误! enoent恩恩特

Error while executing: npm ERR!执行时出错:npm ERR! enoent undefined ls-remote -h -t enoent 未定义 ls-remote -h -t

ssh://git@github.com/pemrouz/buble.git npm ERR! ssh://git@github.com/pemrouz/buble.git npm ERR! enoent npm ERR! enoent npm ERR! enoent恩恩特

npm ERR! npm 错误! enoent spawn git ENOENT npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to enoent 这与

npm not being able to find a file. npm 无法找到文件。 npm ERR! npm 错误! enoent npm ERR! enoent npm ERR! A complete一套完整的

log of this run can be found in: npm ERR!这次运行的日志可以在:npm ERR! C:\\Users\\Mukesh C:\\用户\\穆克什

Lekhrajani\\AppData\\Roaming\\npm-cache_logs\\2020-02-19T10_09_53_537Z-debug.log Lekhrajani\\AppData\\Roaming\\npm-cache_logs\\2020-02-19T10_09_53_537Z-debug.log

How can I install popperjs / popper.js using npm?如何使用 npm 安装 popperjs / popper.js?

As per their docs, popperjs should be installed using:根据他们的文档,应该使用以下命令安装 popperjs:

npm i @popperjs/core

or it you can use their CDN for runtime downloading by placing the script call in the <HEAD>...</HEAD> tag of your index.html :或者,您可以通过将脚本调用放置在index.html<HEAD>...</HEAD>标记中来使用他们的 CDN 进行运行时下载:

<script src="https://unpkg.com/@popperjs/core@2"></script>

https://github.com/popperjs/popper-core https://github.com/popperjs/popper-core

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM