anyone else running into issues deploying?
I am getting stuck at #16 [server-builder 8/11] RUN npm install && cd .wasp/build/server && npm install. i rolled my code back to last working deployment code and did wasp clean but still running into issues. I can do local builds of server and get it deployed but using remote server with command wasp deploy fly deploy hangs each time.
3 Replies
Hi @oasisenterprise. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This sounds like the
Since remote builds can be flaky, you can force Wasp/Fly to build on your machine: This uses the local Docker builder instead of Fly’s remote builder and can avoid some remote
You already ran
In a similar case, the problem was not Wasp or the app code but the environment (VPS with only 512 MB RAM) causing
If your remote builder (or the machine running the local build) has low memory or is under heavy load,
There is an open issue about
Let it run a bit longer, and check whether CPU/network usage is active. If after: -
npm install phase of the Fly deploy getting “stuck”/failing while Wasp is building the server image remotely. There are a few patterns and debugging tricks in the docs and threads:
1. Try a local build instead of remoteSince remote builds can be flaky, you can force Wasp/Fly to build on your machine: This uses the local Docker builder instead of Fly’s remote builder and can avoid some remote
npm install hangs.[[Build locally](https://wasp-lang.dev/docs/advanced/deployment/cli#building-locally)]
2. Clean + rebuild everythingYou already ran
wasp clean, which is the right first step. The recommended full “reset” flow is:
Running npm install manually in .wasp/out/web-app and .wasp/out/server can surface more detailed errors than the Wasp CLI shows when it just says npm install failed or appears to hang.[[OpenSaaS thread](https://discord.com/channels/686873244791210014/1213593156646604820)]
3. Watch for resource / environment issuesIn a similar case, the problem was not Wasp or the app code but the environment (VPS with only 512 MB RAM) causing
npm install to be killed with exit code -9 / “killed” messages.[[OpenSaaS thread](https://discord.com/channels/686873244791210014/1213593156646604820)]If your remote builder (or the machine running the local build) has low memory or is under heavy load,
npm install can silently die or appear to hang.
4. If it’s just very slow, it can look stuckThere is an open issue about
npm install during wasp start (and similar phases) not emitting enough progress output, which makes it feel like nothing is happening even when it’s still working.[[npm install verbosity](https://github.com/wasp-lang/wasp/issues/249)]Let it run a bit longer, and check whether CPU/network usage is active. If after: -
wasp clean
- wasp compile + manual npm install in .wasp/out/*
- and wasp deploy fly deploy --build-locally
you still see it hang, the knowledge sources don’t contain a more specific fix for this exact #16 [server-builder 8/11] RUN npm install ... step. In that case, sharing the exact npm install output from .wasp/out/server (from a manual run) in Discord would be the next step to debug further.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @oasisenterprise, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?using this worked well wasp deploy fly deploy --build-locally. Did not even know that was an option. thank you.
Wohooo @oasisenterprise, you just became a Waspeteer level 4!