ISH-Gruppe / screenario

Screenario - The screen for every scenario
https://screenar.io
GNU General Public License v3.0
2 stars 2 forks source link

qrcode-react breaks build #26

Closed liam-k closed 2 years ago

liam-k commented 2 years ago

Just did a fresh clone of the main branch and npm i gives this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: screenario-react@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.12 - 16.2" from qrcode-react@0.1.16
npm ERR! node_modules/qrcode-react
npm ERR!   qrcode-react@"^0.1.16" 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! 
npm ERR! See /Users/liam/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/liam/.npm/_logs/2022-08-09T21_07_04_022Z-debug-0.log

Removing qrcode-react from package.json solves the problem. Can you reproduce this @s-gbz?

s-gbz commented 2 years ago

That's weird. I can't reproduce this error. There came up an unseen warning/ error (which doesn't hinder the app to run), but there was nothing qrcode related.

Module not found: Error: Can't resolve '/home/grilborzer/Code/screenario-bug-test#26/screenario-react/node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&reconnect=10' in '/home/grilborzer/Code/screenario-bug-test#26/screenario-react'
ERROR in Module not found: Error: Can't resolve '/home/grilborzer/Code/screenario-bug-test#26/screenario-react/node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&reconnect=10' in '/home/grilborzer/Code/screenario-bug-test#26/screenario-react'
liam-k commented 2 years ago

Weird. Not sure if this is related, but whenever I pull & npm i I also get a warning about the lockfile being generated with an old version of npm. Maybe it works for you because you’re out of date?

image
liam-k commented 2 years ago

YO! Inspired by the mui incompatibility in #34, I took a closer look at this complaining package and it’s this one https://www.npmjs.com/package/qrcode-react

"qrcode - react". The package is 5 years old and thus incompatible with newer versions of react, of course. Did you actually mean to install "qrcode . react"?

AND WHY THE HELL DID YOU GET NO ERROR MESSAGES? Whaaaaaaaaaaat

s-gbz commented 2 years ago

Well I installed the previous package (-), because it's simple to use and works :shrug: (on my machine + the server) :smile: We can use the other one though if you want (LOL, need) to. Coincidentally I had installed the newer qrcode package as I tried to fix the sizing issue.

So yeah, who ever gets the qrcode issue shall install the new one :+1:

liam-k commented 2 years ago

Fair point that it also works on the server, maybe my installation is set to a "stricter" mode somehow? Probably the --legacy-deps flag thingy. But still, it’s clearly a severely outdated package, we should never use any of those.

s-gbz commented 2 years ago

I'm not sure if there's a downside since it's compilated JS at the end of the process, but yeah like I said I don't mind if we change the package. Let's go for it!

s-gbz commented 2 years ago

And since it's my task I'll switch it and close this issue.