You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple node express server running phonebook with minimal API, which can be found at this repo. I've been using it to play around with got stuck with this segfault error. I tried 4 scripts:
bun --hot index.js
bun run --hot index.js
bun --watch index.js
bun run --watch index.js
They all returned the same, and upgrading bun to canary didn't solve the issue overall, but it did run in --hot mode ONCE (soon it crushed segfault too).
However, when I tried it with another simple express server, that uses CommonJS modules instead of ES modules, both worked fine.
What is the expected behavior?
# at app using CJS modules
bun run --hot index.js # saving several times
Example app listening on port 3000
Example app listening on port 3000
Example app listening on port 3000
Example app listening on port 3000
Example app listening on port 3000
Example app listening on port 3000
What do you see instead?
# at app using ES modules
bun run --hot index.js
[0.16ms] ".env"
connecting to mongodb+srv://<................>
connected to MongoDB
[1] 3391 segmentation fault bun run --hot index.js
Additional information
No response
The text was updated successfully, but these errors were encountered:
Looked at it a little, something to do with Mongoose + node:net, I think. Likely some arguments parsing which is incorrect
oh, interesting. i didn't think it might be mongoose. I can implement mongoose to the second repo to check, how it behaves with commonjs modules, if you wish
What version of Bun is running?
0.6.6
What platform is your computer?
Darwin 22.4.0 arm64 arm
What steps can reproduce the bug?
I have a simple node express server running phonebook with minimal API, which can be found at this repo. I've been using it to play around with got stuck with this segfault error. I tried 4 scripts:
bun --hot index.js
bun run --hot index.js
bun --watch index.js
bun run --watch index.js
They all returned the same, and upgrading bun to canary didn't solve the issue overall, but it did run in --hot mode ONCE (soon it crushed segfault too).
However, when I tried it with another simple express server, that uses CommonJS modules instead of ES modules, both worked fine.
What is the expected behavior?
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: