Vercel & dependencies Issues

Hi all :wave:t2:

i have some sudden issues on Vercel in PROD. Here the build log:

I’ve updated all the packages on the local environment, but when i run npm install i get the following errors:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.5.0" from @frontity/lazyload@1.0.12
npm ERR! node_modules/@frontity/lazyload
npm ERR! @frontity/lazyload@"^1.0.12" from the root project
npm ERR! peer react@"^16.14.0" from react-dom@16.14.0
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"^16.5.0" from @frontity/lazyload@1.0.12
npm ERR! node_modules/@frontity/lazyload
npm ERR! @frontity/lazyload@"^1.0.12" from the root project
npm ERR! peer react-dom@"^16.8 || ^17.x" from @kunukn/react-collapse@2.2.9
npm ERR! node_modules/@kunukn/react-collapse
npm ERR! @kunukn/react-collapse@"^2.2.9" from the root project
npm ERR! 3 more (@kunukn/react-collapse, @loadable/component, @react-pdf/renderer)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-elastic-carousel@"^0.11.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@17.0.1
npm ERR! node_modules/react
npm ERR! peer react@"^15.0.0 || ^17.0.0" from react-elastic-carousel@0.11.1
npm ERR! node_modules/react-elastic-carousel
npm ERR! react-elastic-carousel@"^0.11.1" 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/dejangeorgiev/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dejangeorgiev/.npm/_logs/2021-02-22T22_14_17_050Z-debug.log

Here the repo: GitHub - dejangeorgiev/ruthgeorgiev-frontity

Can someone check this please?

Thanks a lot.
Dejan

Hi @dejangeorgiev,

I’ve cloned your repo GitHub - dejangeorgiev/ruthgeorgiev-frontity
And when I installed dependencies locally I got this error related to the react-reading-progress npm package

Error: ./node_modules/react-reading-progress/lib/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
BrowserslistError: `browserlist` key instead of `browserslist` in /Users/juanma/PROJECTS/2021/FRONTITY/COMMUNITY/FEBRUARY/ruthgeorgiev-frontity/node_modules/react-reading-progress/package.json

After removing this dependency (and the use of it in the code) and reinstalled dependencies from scratch by using a command such as…

rm -rf node_modules && rm -rf package-lock.json && rm -rf yarn-error.log && rm -rf yarn.lock && npm cache clean --force && npm i

I’ve been able to succesfully deploy your project to Vercel

(base) ⬢  ruthgeorgiev-frontity  master ⦿ npx vercel login
Vercel CLI 21.2.3
We sent an email to juanmaXXXXXXX@XXXXXXXmail.com. Please follow the steps provided inside it and make sure the security code matches Happy Pond Skater.
✔ Email confirmed
Congratulations! You are now logged in. In order to deploy something, run `vercel`.
💡  Connect your Git Repositories to deploy every branch push automatically (https://vercel.link/git).
(base) ⬢  ruthgeorgiev-frontity  master ⦿  npx vercel
Vercel CLI 21.2.3
? Set up and deploy “~/PROJECTS/2021/FRONTITY/COMMUNITY/FEBRUARY/ruthgeorgiev-frontity”? [Y/n] y
? Which scope do you want to deploy to? JuanMa
? Link to existing project? [y/N] n
? What’s your project’s name? ruthgeorgiev-frontity
? In which directory is your code located? ./
🔗  Linked to juanmaguitar/ruthgeorgiev-frontity (created .vercel and added it to .gitignore)
🔍  Inspect: https://vercel.com/juanmaguitar/ruthgeorgiev-frontity-8xtoe7d9w/juanmaguitar [3m]
✅  Production: https://ruthgeorgiev-frontity.vercel.app [copied to clipboard] [9m]
📝  Deployed to production. Run `vercel --prod` to overwrite later (https://vercel.link/2F).
💡  To change the domain or build command, go to https://vercel.com/juanmaguitar/ruthgeorgiev-frontity/settings

Hope this helps!

2 Likes

Hi @juanma :wave:t2:

Thank you very much for your feedback.
I’ve tried the exact same as you did, but i get a different error - see below.

I guess this might be an issue with @frontity/lazyload@1.0.12 on my side.

Please let me know your thoughts on this.
Thanks.
Dejan

Hi @dejangeorgiev

Have you updated your Frontity packages versions to the latest ones available? Here you have a guide that explains how to keep your project dependencies updated to their latest versions

https://docs.frontity.org/guides/keep-frontity-updated

Hope this helps

Hi @juanma

Yes i did. But i get the same errors also when i install a fresh frontity package. I guess i have to update some dependencies locally on my laptop…

But thanks for your advice!

1 Like