podlove / podlove-ui

Monorepo for all UI related projects like Web Player and Subscribe Button
MIT License
83 stars 33 forks source link

npm install fails on node 15 #837

Open ghost opened 3 years ago

ghost commented 3 years ago

Looks like some sort of react version problem. What is lerna, lerna dont hurt me, dont hurt me, no more.

Ubuntu 20.04 stable

  1. sudo npm i -g lerna
  2. clone repo, go inside
  3. npm i

It's trying to do lerna bootstrap --hoist but fails:

lerna info hoist Finished pruning hoisted dependencies
[                  ] \ install dependencies: info hoist Finished pruning hoisted dependencies
lerna ERR! npm install exited 1 in 'root'
lerna ERR! npm install stderr:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   peer react@"*" from @storybook/addon-knobs@5.2.5
npm ERR!   node_modules/@storybook/addon-knobs
npm ERR!     @storybook/addon-knobs@"5.2.5" from the root project
npm ERR!   peer react@"*" from @storybook/addon-options@5.2.5
npm ERR!   node_modules/@storybook/addon-options
npm ERR!     @storybook/addon-options@"5.2.5" from the root project
npm ERR!   3 more (@storybook/components, react-dom, @storybook/theming)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from react-focus-lock@1.19.1
npm ERR! node_modules/@storybook/components/node_modules/react-focus-lock
npm ERR!   react-focus-lock@"^1.18.3" from @storybook/components@5.2.8
npm ERR!   node_modules/@storybook/components
npm ERR!     @storybook/components@"5.2.8" from @storybook/addon-actions@5.2.8
npm ERR!     node_modules/@storybook/addon-actions
npm ERR!       @storybook/addon-actions@"5.2.8" 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 /home/s/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/s/.npm/_logs/2021-03-16T12_33_00_291Z-debug.log
lerna ERR! npm install exited 1 in 'root'

Attached: eresolve-report.txt 2021-03-16T12_33_00_291Z-debug.log

ghost commented 3 years ago

Fixed by running npm install --legacy-peer-deps, via https://stackoverflow.com/questions/64842060/react-react-dom-package-dependency-conflict

Might be nice to include this info in the build doc somewhere or somehow fix the package.json dev install stuff

Actually nevermind, after doing the command above it now doesnt compile some other way

@podlove/web-player:     LOG from copy-webpack-plugin
@podlove/web-player:     <e> unable to locate '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/player/dist' at '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/player/dist'
@podlove/web-player:     <e> unable to locate '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/subscribe-button/dist' at '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/subscribe-button/dist'
@podlove/web-player:     + 164 hidden lines
@podlove/web-player:     
@podlove/web-player:     ERROR in unable to locate '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/player/dist' at '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/player/dist'
@podlove/web-player:     
@podlove/web-player:     ERROR in unable to locate '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/subscribe-button/dist' at '/home/s/Documents/repos/podlove-ui/apps/web-player/node_modules/@podlove/subscribe-button/dist'
@podlove/web-player: ℹ 「wdm」: Failed to compile.

:smile:

alexander-heimbuch commented 3 years ago

I will have a look at the setup on the weekend :)

alexander-heimbuch commented 3 years ago

I could reproduce it with node version 15. It works with the LTS version node 14 so you might want to use this version instead. Still will have this one in scope for upgrades to 16 👍