I recently created an angular project and am trying to install popper.js but not getting installed.
ng new <<project>>
cd <<project>>
npm install popper --save
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0
(node_modules\\rijs.resdir\\node_modules\\chokidar\\node_modules\\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"}) npm ERR! code ENOENT npm ERR! syscall
spawn git npm ERR! path git npm ERR! errno ENOENT npm ERR! enoent
Error while executing: npm ERR! enoent undefined ls-remote -h -t
ssh://git@github.com/pemrouz/buble.git npm ERR! enoent npm ERR! enoent
npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to
npm not being able to find a file. npm ERR! enoent npm ERR! A complete
log of this run can be found in: npm ERR! C:\\Users\\Mukesh
Lekhrajani\\AppData\\Roaming\\npm-cache_logs\\2020-02-19T10_09_53_537Z-debug.log
How can I install popperjs / popper.js using npm?
As per their docs, popperjs should be installed using:
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 :
<script src="https://unpkg.com/@popperjs/core@2"></script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.