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

bin/setup doesn't tell me how to fix NodeJS version or yarn issue #1608

Open
andrewculver opened this issue Jul 15, 2024 · 1 comment
Open

Comments

@andrewculver
Copy link
Contributor

Checking NodeJS

Bullet Train requires Node.js 20.15.0 and `node -v` returns 16.17.0.
Try proceeding with Node 16.17.0 anyway? [Y/n]
n
You've chosen not to continue with Node 16.17.0. Goodbye.
Checking yarn

Bullet Train requires yarn 4.2.2 and `yarn -v` returns 1.22.19.
Try proceeding with yarn 1.22.19 anyway? [Y/n]
n
You've chosen not to continue with yarn 1.22.19. Goodbye.

And when I try to run yarn set version 4.2.2 I get the following:

error This project's package.json defines "packageManager": "yarn@4.2.2". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.

Except that running corepack enable doesn't fix anything!

@jagthedrummer
Copy link
Contributor

@andrewculver like #1606 I think the question here is what method we'd use to try to handle installing node for people.

I'm surprised that corepack enable didn't do anything. When I've switched node versions locally it's worked just fine to do npm install -g yarn && corepack enable.

Trying this to test:

$ npm -g uninstall yarn

removed 1 package in 131ms
Reshimming asdf nodejs...
$ ./bin/setup-scripts/check_yarn.rb

--------------------------------------------------------------------------------
Checking yarn

No preset version installed for command yarn
Please install a version by running one of the following:

asdf install nodejs 20.15.0

or add one of the following versions in your config file at /Users/jgreen/.tool-versions
nodejs 20.5.1
nodejs 20.6.1
nodejs 20.7.0
nodejs 20.8.0
nodejs 20.8.1
You don't have yarn installed. We can't proceed without it. Try `npm install -g yarn && corepack enable`.
$ npm install -g yarn && corepack enable

added 1 package in 281ms
Reshimming asdf nodejs...
$ ./bin/setup-scripts/check_yarn.rb

--------------------------------------------------------------------------------
Checking yarn

Bullet Train requires yarn 4.2.2 and `yarn -v` returns 4.2.2.

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

No branches or pull requests

2 participants