I recently upgraded to Rails 7. Everything works locally (including bundle exec rails assets:precompile
however if I build my app in Docker (to deploy to Fly) I get to this line: RUN bundle exec rails assets:precompile
and then things fail with this message:
#23 16.19 Compiling...
#23 18.46 Compilation failed:
#23 18.46 Internal Error: project@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
#23 18.46 at pQ.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:435:5146)
#23 18.46 at Wf.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:391:1264)
#23 18.46 at /root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7695
#23 18.46 at Rf (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:8965)
#23 18.46 at ge (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7675)
#23 18.46
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bundle exec rails assets:precompile]: exit code: 1
From what I can tell this error #23 18.46 Internal Error: project@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
is the crux of the issue (project@workspace
is just my project's name @workspace). Generally I would expect this to list a package, but there is none listed. I've deleted the lock file, yarn install
works. Nothing seems out of place with package.json
.
Any thoughts on what might be breaking the precompilation?