dash
dash copied to clipboard
[BUG] bin/setup fails with yarn error
Before we start...:
- [X] I checked the documentation and found no answer
- [X] I checked to make sure that this issue has not already been filed
- [X] I'm reporting the issue to the correct repository (for multi-repository projects)
Branch/Commit:
main
branch
Expected behavior:
bin/setup should just work
Actual behavior:
bin/setup fails with yarn issue
Steps to reproduce:
- git clone repository
- bin/setup
Context and environment:
My environment has node installed with nvm. These are all the runtimes I have:
nvm list
-> v0.10.40
v12.16.3
v12.18.3
default -> 0.10.40 (-> v0.10.40)
node -> stable (-> v12.18.3) (default)
stable -> 12.18 (-> v12.18.3) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> v12.18.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.22.0 (-> N/A)
lts/erbium -> v12.18.3
Logs
Here is the console output:
/bin/setup
== Installing dependencies ==
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
The Gemfile's dependencies are satisfied
== Copying database files ==
== Copying sample files ==
== Preparing tmp directories ==
== Preparing database ==
Node version 0.10.40 is not supported, please use Node.js 4.0 or higher.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).
== Command ["bin/rails db:prepare"] failed ==
I will abide by the [code of conduct] (https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md)
@etagwerker if you switch your node version to Node.js 4.0 or higher and run the setup again it's fixed?
@bronzdoc If I use 12.18, then the problem goes away:
➜ dash git:(main) ✗ nvm use 12.18
Now using node v12.18.3 (npm v6.14.6)
➜ dash git:(main) ✗ ./bin/setup
== Installing dependencies ==
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
The Gemfile's dependencies are satisfied
== Copying database files ==
== Copying sample files ==
== Preparing tmp directories ==
== Preparing database ==
== Removing old logs and tempfiles ==
== Restarting application server ==
@etagwerker we could add a .nvmrc
file to the root folder. This enables someone to type nvm use
(note no version specified in the command) and it will automatically switch the version in the file. If they don't have it locally already, they can then run nvm install
and it will grab the correct version for them.
And if we did that we could just add a note in the README
.
@kindoflew not sure that is the direction we want to go with to solve this problem... considering we are using docker in other OSS projects, maybe adding docker support for development could solve this problem?
@etagwerker, that makes sense! And having the same kind of local environment setup would keep all of our projects consistent.
Edit: #101 has been opened to request a docker container