Fix error during `wasp start` after `wasp start` and failing `wasp build`
Version: 0.13.2. (probably post-0.12.0 and caused by https://github.com/wasp-lang/wasp/issues/1769#issuecomment-1952938100, doesn't happen with 0.11.8).
OS: Linux
How to reproduce:
- Run
wasp new something && cd something. - Run
wasp startand wait for it to finish. - Run
wasp buildand see it fail because of an inappropriate database (SQLLite). - Run
wasp startagain and see the error.
Here's how it looks in action:
$ wasp start
🐝 --- Starting compilation and setup phase. Hold tight... ------------------------
🐝 --- Compiling wasp project... --------------------------------------------------
✅ --- Successfully completed npm install. ----------------------------------------
🐝 --- Setting up database... -----------------------------------------------------
✅ --- Database successfully set up. ----------------------------------------------
🐝 --- Building SDK... ------------------------------------------------------------
wasp-bin: npx: streamingProcess: chdir: invalid argument (Bad file descriptor)
Check if it got fixed by #1769
I'm getting the same error while trying to setup opensaas.
I'm following the exact instructions in the docs (installing wasp -> wasp new -> wasp start db) and then the following wasp commands fail:
$ wasp db migrate-dev
🐝 --- Compiling wasp project... --------------------------------------------------
[ Wasp ] Starting npm installwasp-bin: npm: streamingProcess: exec: invalid argument (Bad file descriptor)
$ wasp start
🐝 --- Starting compilation and setup phase. Hold tight... ------------------------
🐝 --- Compiling wasp project... --------------------------------------------------
[ Wasp ] Starting npm installwasp-bin: npm: streamingProcess: exec: invalid argument (Bad file descriptor)
os: Ubuntu 24.04 wasp version: 0.13.2 node version (if it's matter): 18.19.1
any idea of how can I proceed to set it up? @sodic TIA!
Hey @Rotemoyal, thanks for letting us know!
It's not ideal, but you should be able to fix it by running wasp clean after any command throws this error, and then rerunning the command.
wasp clean won't delete anything important, it only cleans up the build artifacts, so no worries.
@sodic thanks for your quick response! actually it didn't solve the issue:
$ wasp db migrate-dev
🐝 --- Compiling wasp project... --------------------------------------------------
[ Wasp ] Starting npm installwasp-bin: npm: streamingProcess: exec: invalid argument (Bad file descriptor)
$ wasp clean
🐝 --- Deleting the .wasp/ directory... -------------------------------------------
✅ --- Deleted the .wasp/ directory. ----------------------------------------------
🐝 --- Deleting the node_modules/ directory... ------------------------------------
✅ --- Nothing to delete: The node_modules/ directory does not exist. -------------
$ wasp db migrate-dev
🐝 --- Compiling wasp project... --------------------------------------------------
[ Wasp ] Starting npm installwasp-bin: npm: streamingProcess: exec: invalid argument (Bad file descriptor)
Hmm, strange, must be something else then. What happens when you run npm --version?
well you found it :smile:
I'm working on a brand new PC and npm binary wasn't in PATH.
maybe it worth checking if npm exists so the error message will be indicative?
thanks A LOT for helping!!!
maybe it worth checking if npm exists so the error message will be indicative?
Definitely! I just made a new issue to track it: https://github.com/wasp-lang/wasp/issues/2113
Thanks for letting us know :)
Had the same issue with Ubuntu 24.04 and node 18. For me it helped to upgrade node to 20 and doing a fresh wasp new.
Short update due to quite a bit of conversation in the issue: we still don't know the cause here, we are where we were when we opened this issue, but we also didn't try much debugging yet, since there were no more reports. It is still likely to get fixed once we do https://github.com/wasp-lang/wasp/issues/1769 . If there will be more reports, we can try going after it directly.
Getting this issue too
Getting this issue too
Did you the suggested solution: https://github.com/wasp-lang/wasp/issues/1980#issuecomment-2183976395
Yes, it fixed the problem. But thought I'd report it anyway
@hellwaiver Good thing you did :)
It helps knowing how many people run into it. Thanks!
Just ran into the same issue on a fresh ubuntu 24.04 and node 18, also following the opensaas template. I got past this one by installing npm, however ran into another issue at the SDK build step:
I tried running wasp clean and running again, but same error.
Just ran into the same issue on a fresh ubuntu 24.04 and node 18, also following the opensaas template. I got past this one by installing npm, however ran into another issue at the SDK build step:
I tried running wasp clean and running again, but same error.
Can you try using node version 20?
I am having an issue where I am trying to deploy the app to heroku but after I generate the build and try to push to heroku app is crashing, this is the log:
node:internal/modules/cjs/loader:1051 throw err; ^
Error: Cannot find module '/usr/src/app/wasp' at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15) at Module._load (node:internal/modules/cjs/loader:901:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Node.js v20.8.0
can somebody help with this?
I am having an issue where I am trying to deploy the app to heroku but after I generate the build and try to push to heroku app is crashing, this is the log:
@steve-quadranttech , could you please create a separate issue for this, since I don't beleive this is associated with the current Github issue. Or maybe even better, go to our Discord server and ask this under #questions channel? That will allow us to track this properly and hopefully help.
Hey @Rotemoyal, thanks for letting us know!
It's not ideal, but you should be able to fix it by running
wasp cleanafter any command throws this error, and then rerunning the command.
wasp cleanwon't delete anything important, it only cleans up the build artifacts, so no worries.
This solved my issue, thanks. I ran this command first wasp clean . Then I ran wasp start
Was able to replicate the issue and the problem occurs in the third step when wasp build returns an error message.
Caused the failure by using a dummy mail provider instead of an inappropriate database (SQLLite), however wasp clean solved it. 0.15.2
