bullet_train
bullet_train copied to clipboard
`bin/setup` failing for me based on Node version.
I'm running bin/setup
without running bin/configure
because I just want to do some work on Bullet Train itself. When I run that, I get the following output:
yarn check v1.22.19
error [email protected]: The engine "node" is incompatible with this module. Expected version "14 || >=16.14". Got "16.13.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "14 || >=16.14". Got "16.13.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
== Command ["yarn install"] failed ==
For context:
andrewculver@Andrews-MacBook-Air-15 bullet_train % node -v
v16.13.0
When I went back and ran bin/configure
it fails with this:
Bullet Train requires Node.js 20.8.1 and `node -v` returns 16.13.0.
Try proceeding with Node 16.13.0 anyway? [y/n]
n
At this point I'm running nvm install 20.8
and that's fine, except it didn't tell me how to do that and I feel a little bit like it would be nice if it did that for me? Or at least told me how to do it?
Also, I wouldn't hate it if bin/dev
used whatever Node version manager they were using to set the version on the fly before booting the application.
I don't love this experience for newcomers if it's possible to smooth it out.
Started looking into this one today and having some trouble checking the version manager in both the Ruby script (bin/configure
) and bash (bin/dev
).
For example, nvm
, asdf
, or fnm
are available version managers. I wanted to check for these with something like this.
node_manager = [
"nvm",
"asdf",
"fnm"
].find do |manager|
!`command -v #{manager}`.empty?
end
I can do command -v nvm
in the terminal, but not in the script. However, command -v git
, etc., works.
I think to make this work we'd have to get pretty specific, like checking if .nvmrc
exists to see if nvm
is installed. Then we could set the correct version in bin/dev
. Maybe there's a simpler solution that I'm missing. Thoughts?