stimulus-use: v0.25.0: Installation fails

Calling a “npm install stimulus-use” fails when trying to install latest version 0.25.0. This seems to be related to “hotkeys-js” which is declared a peerDependency. Npm output:

npm WARN ERESOLVE overriding peer dependency
npm WARN Found: hotkeys-js@undefined
npm WARN node_modules/hotkeys-js
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer hotkeys-js@">3" from stimulus-use@0.25.0
npm WARN node_modules/stimulus-use
npm WARN   stimulus-use@"*" from the root project
npm ERR! code ETARGET
npm ERR! notarget No matching version found for hotkeys-js@>3.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

As one would expect, regular install of <= 0.24 works without troubles.

Node version: 14.16.0 Npm version: 7.11.2

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 28 (21 by maintainers)

Commits related to this issue

Most upvoted comments

@adrienpoly As a cool side-effect, there is now a bundle export analysis on Bundlephobia!!

https://bundlephobia.com/package/stimulus-use@0.25.2

^ 0.25.2 without export analysis

https://bundlephobia.com/package/stimulus-use@0.25.3

^ 0.25.3 with export analysis so you can see how big each module is 🥳

Thanks @ParamagicDev I released v0.25.3 with your suggestions and it works MUCH better!

@FlxAlbroscheit if you could confirm that it is working for you too with NPM (I used yarn)

sorry to be causing so much trouble and yes, I thought

let the bundler figure out whether to (not) import hotkeys-js, depending on whether { useHotkeys } is imported in the parent project.

this would be the job of the bundler…