-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Railtie yarn check --integrity fails running in development under docker #1568
Comments
Hi. I have the same problem. @sauy7 , got any solutions? Thanks. |
@mhbsti None, other than running with |
Thank you @sauy7 . If my find any public solution here. |
Same problem here, but outside Docker |
Same problem, deploying to Heroku |
Same problem with running rails in my docker local development. |
Seems like the problem are different bindings for
ls node_modules/node-sass/vendor
linux-x64-67
docker exec container ls node_modules/node-sass/vendor/
linux-x64-64
linux-x64-67 Edit: Possible workarounds:
|
same problem outside docker |
👍 same on dev without docker |
What have people done to solve this. It literally just showed up today and I have no idea what I should do! |
Try: |
I had this problem but |
Edited: not a solution since docker compose ignores |
The command it runs if you want to shell into the running container is |
The integrity failure comes because docker compose ignores
volumes:
- '.:/usr/src/app' Error occurs this time since the node modules are not for container environment. After you run A solution could be to avoid volumes:
- '.:/usr/src/app'
- '/usr/src/app/node_modules' |
It still occurs with volume overlays is the baffling part. Our workflow also doesn't involve a local node install so there isn't a local
|
It still happens 😢 As @connorshea suggested removing the check_yarn_integrity in development fixed, but I don't think is the best way to go. |
What are the down sides of setting |
@dmolesUC It often saved me already when running |
Any solutions??? |
Thanks @zhengpd! Your suggestion worked with rails |
What worked for me is not to COPY the yarn.lock to the image by Dockerfile. yarn.lock must be generate after Dockerfile execute "RUN yarn install". Try remove yarn.lock from your project too and run the "docker-compose up --build" again. |
@rafaeljcadena That seemed to do the trick! |
But, then you install not the same Versions. Which may not be what you want. |
Yes, you can't guarantee the exactly version as in yarn.lock, but in package.json you have the lib versions with safe range. |
thanks. i love you |
Trying @rafaelfranca suggestion did the trick, here's the end result for my
And the docker-compose:
|
go for it |
What does the yarn integrity check do? Are there consequences/risks for disabling it? |
Software versions:
Expected behaviour:
I would expect a new containerised Rails 5.2 application to pass the yarn integrity check when starting the application.
Note: Running
puma -C config/puma.rb
natively on the host Mac OS X does not trigger this issue.Actual behaviour:
Same error as reported in #1374. When running the rails development server:
Steps to reproduce:
Add .dockerignore, Dockerfile, .env.docker and docker-compose.yml files as per this gist:
https://gist.github.com/sauy7/d5c732faad876fde8b2d16672b29a992
Run:
docker-compose up --build
Note in the output that:
shows:
Wait for Rails to try to fully start up.
Observe in server output:
Note in config/environments/development.rb:
config.webpacker.check_yarn_integrity = true
Edit to:
config.webpacker.check_yarn_integrity = false
Re-run:
docker-compose up --build
Browse to http://localhost:3000 to see the default Rails home page.
The text was updated successfully, but these errors were encountered: