Download built image from railway or ssh access to service.
Hey folks. I'm debugging an issue with my deployment and it would really help if there was a way to have ssh access to my service or to download the docker image and run some commands on it. Is that something that's possible?
My issue is with the following package https://github.com/cloudflare/html-rewriter-wasm
Locally it works but I think that due to how its built the following line messes with the bundler:
and
asyncify.js
is missing from the end bundle which causes the following error on my deployed service:
I verified that by using patch-packages and on my locally built docker the file is now present, however the issue persists on the railway built and deployed
Would appreciate any help on this πGitHub
GitHub - cloudflare/html-rewriter-wasm: WebAssembly version of HTML...
WebAssembly version of HTMLRewriter. Contribute to cloudflare/html-rewriter-wasm development by creating an account on GitHub.
18 Replies
Project ID:
b880d42a-b80e-4f1e-b8f1-75cdd868eef0
Project id: b880d42a-b80e-4f1e-b8f1-75cdd868eef0
is
asyncify.js
a file you have in your project?It's a part of the html-rewriter-wasm package
are you using nixpacks?
but I think that weird require statement is messing up the nextjs bundler and on my built docker image I only see html_rewriter.js and html_rewriter_bg.wasm unless I replace that require line using patch-packages
Using regular dockerfile to build. Wasn't able to port to nixpacks yet
and you have built and ran an image from this dockerfile locally?
Yeah
Basically added a patch file:
Then when I rebuild locally I do get the
asyncify.js
to be a part of the final docker image
My hunch is that the patch isnt applied while building on railway, to verify that I'd need to access to end image and review the file system, hence my request above πspecifically built an image, not simply ran npm run build?
Yeah docker build and all
railway uses buildx and I assume you aren't but that really shouldn't matter
Hm, I can try that locally
Building with
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1
should know shortly if its any differentsounds good
Yep still looks good with buildx
(and just to re-iterate, if I don't use the patch above, the asyncify.js file doesn't exist, which casues the "cannot find module" error above)
say you did have ssh and you logged in and saw that there was no asyncify.js file in the /node_modules/html-rewriter-wasm/dist/ folder, what would you do then?
Basically run the command above and check if
asyncify.js
is there or not. If it's not then I know my patch isn't being applied, if it is then I'd have to go back to the drawing board π
and if the file wasn't there, what would you do