Internal Error: root-workspace-0b6124@workspace:.: This package doesn't seem to be present

Error on fly deploy.

=> ERROR [stage-4 5/5] RUN bin/rails fly:build                                                                                               
------
 > [stage-4 5/5] RUN bin/rails fly:build:
#23 3.986 I, [2022-11-17T04:10:07.369515 #1]  INFO -- : Writing /app/public/assets/manifest-59847e13867fe9a5a76887c0d0de1f7fb788ec2d1e3094037
<cut 30 lines>
#23 4.013 I, [2022-11-17T04:10:07.396376 #1]  INFO -- : Writing /app/public/assets/activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391
#23 4.484 Compiling...
#23 6.651 Compilation failed:
#23 6.651 Internal Error: root-workspace-0b6124@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to 
#23 6.651     at pQ.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:435:5146)
#23 6.651     at Wf.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:391:1264)
#23 6.651     at /root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7695
#23 6.651     at Rf (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:8965)
#23 6.651     at ge (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7675)
#23 6.651     at async Promise.allSettled (index 0)
#23 6.651     at async eo (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:8293)
#23 6.651     at async /root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:8205
#23 6.651     at async ni.startProgressPromise (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:45507)
#23 6.651     at async He.resolveEverything (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:6238)
#23 6.651
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bin/rails fly:build]: exit code: 1

I’ve yarn install many times. Deleted yarn.lock. Deleted node_modules. Removed and re-added some modules to shake something loose, but keep getting this error. Versions in fly.toml match Node, Ruby and Bundler.

Rails 7, Ruby 3.0.2 with webpacker.

What is root-workspace?

I’m at a loss here. I have deployed one other app to fly successfully, but not this one.

Where else to look?

I have this same error. I’ve tried a ton of things so far including building the docker image myself, running the fly:build task myself locally. Everything looks great and it still fails.

I’m trying to migrate from heroku, and this is deployed there without issues. So I have some confidence that the yarn.lock is right.

@elsieshaffer. I wish you luck. I no longer have that error. I had decided to do some more clean up on my app. I took out gem webpacker, moved to jsbundling-rails with webpack (./bin/rails javascript:install:webpack) and tried to clean up the asset pipeline. Removed node_modules not in use. I still have on important error in that the browser doesn’t see a javascript file. Even when I take the <%= javascript_include_tag ‘javascript_file’ %> out, I still get a deploy error. (I hadn’t tried to deploy until I could get this all straightened out, but your post got me to try again.)

Now I have

Starting clean up. Error release command failed, deployment aborted

and it’s not apparent what is going wrong.

Good luck.