Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch to npm, upgrade to node 14 #813

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Open

Conversation

zenweasel
Copy link
Collaborator

Signed-off-by: Brent Hoover [email protected]

Impact: breaking
Type: chore

Issue

Node 12 is End-of-Life in April. Also trying to keep package managers consistent across projects so normalizing on npm.

Solution

Move everything to npm and node 14.18.1

Breaking changes

If you have build steps that rely on yarn, they may no longer work

Testing

Theoretically nothing should change

@zenweasel zenweasel marked this pull request as ready for review February 10, 2022 08:39
@MohanNarayana
Copy link
Contributor

I am on node 14.18.1
Doing npm i gives the below dependency error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^16.13.0" from the root project
npm ERR!   peer react@"^16.4.1" from @reactioncommerce/[email protected]
npm ERR!   node_modules/@reactioncommerce/components-context
npm ERR!     @reactioncommerce/components-context@"~1.2.0" from the root project
npm ERR!     peer @reactioncommerce/components-context@"~1.2.0" from @reactioncommerce/[email protected]
npm ERR!     node_modules/@reactioncommerce/components
npm ERR!       @reactioncommerce/components@"~0.67.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"~16.9.0" from @reactioncommerce/[email protected]
npm ERR! node_modules/@reactioncommerce/components
npm ERR!   @reactioncommerce/components@"~0.67.2" 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/mohannarayana/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mohannarayana/.npm/_logs/2022-02-10T22_20_44_382Z-debug-0.log

Further doing npm i --force the storefront shows the below on console
image

@zenweasel
Copy link
Collaborator Author

zenweasel commented Feb 11, 2022

@MohanNarayana The build process runs 14.18 and is not seeing this error. Can you give me any more info about what about your configuration is different? Also I just did a fresh clone and npm install and did not see this issue

@zenweasel
Copy link
Collaborator Author

@MohanNarayana Can you make sure you rm -rf node_modules and try again?

@MohanNarayana
Copy link
Contributor

I did a fresh clone of storefront (no npm i and no removing node_modules) and everything worked fine.

Next I did npm i which did not throw dependency errors but I got this error on storefront.
image

There is a yarn.lock file that gets generated every time I restart storefront. The storefront does not load until the yarn.lock gets regenerated. When it starts eventually I see an Internal server error. The Errors are inconsistent, not able to narrow down on the repro steps.

@MohanNarayana
Copy link
Contributor

Everything works with the original yarn.lock. Deleted or regenerated one does not start storefront.

@zenweasel
Copy link
Collaborator Author

@MohanNarayana I am not able to reproduce this error with a fresh clone, storefront loads fine for me except for the error with styled-components that I fixed in the other PR. Also this is not happening in CI. Npm works fine for me. Can you give me some more clearer steps to reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants