riot / hot-reload

Riot hot reload API
MIT License
16 stars 5 forks source link

update needed for riot 7.X #18

Open qlbit-com opened 2 years ago

qlbit-com commented 2 years ago

assume you checking out a project fresh, when no node_modules, no package-lock.json is available.

when package.json references riot 7.0.3 and riot@hot-reload 6.0.0 npm install shows error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: riot@7.0.3
npm ERR! node_modules/riot
npm ERR!   riot@"^7.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer riot@"^6.0.0" from @riotjs/hot-reload@6.0.0
npm ERR! node_modules/@riotjs/hot-reload
npm ERR!   @riotjs/hot-reload@"^6.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

steps to reproduce:

  1. use https://github.com/riot/webpack-template
  2. verify no node_modules folder available
  3. verify no package-lock.json file available
  4. update reference to riot 7.0.3 in package.json
  5. run npm install

workaround available:

  1. temporarily reference riot 6.0.0 in package.json
  2. run npm install
  3. reference riot 7.0.3 in package.json
  4. run npm install again; it will succeed
GianlucaGuarini commented 2 years ago

@qlbit-com for now you can simply install it with npm i @riotjs/hot-reload -f. During the next few weeks I will need to update the Riot.js ecosystem bumping the dependencies to v7