1
votes

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

[email protected]: 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://[email protected]/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?

1

1 Answers

0
votes

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>

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