pruvious: ERROR [unhandledRejection] socket hang up

Node: v20.11.1 npm: 10.2.4 yarn: both classic(v1) and stable(v4) pruvious: 3.10.7 nuxt: 3.10.3

I get the error below when i run npm run dev or yarn dev on a fresh install of pruvious on navigating to localhost:3000 which just loads:

 ERROR  [unhandledRejection] socket hang up

  at connResetException (node:internal/errors:787:14)
  at Socket.socketOnEnd (node:_http_client:519:23)
  at Socket.emit (node:events:530:35)
  at endReadableNT (node:internal/streams/readable:1696:12)
  at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

NGL I like the idea of a refactor with Kysely (although I have limited experience with it).

Not to mention the existence of db0 and the fact that not only is already available in the latest Nitro/Nuxt builds but also Kysely could be implemented sooner (see upcoming integrations), since db0 already has basic support for both sqlite (better-sqlite3) and postgres.

Hey @PP-Tom, thanks for the suggestion - Drizzle is also a good option. The main reasons I picked Sequelize were its sync() method, which is used and extended to work with database indexes and constraints in Pruvious instead of classic migrations, and object arguments for querying instead of method chaining like in Drizzle and Kysely, making it much more straightforward for extension.

I have already begun working on transitioning to Kysely in a local branch. So far, I have completed the new sync process, but there is still a long way to go with refactoring and testing the query builder. If I discover some interesting Drizzle features in the meantime that aren’t available in Kysely, I’ll consider switching over to it.

I see, thanks for the feedback/update.

I guess I’ll have to use postgres in the meantime(though i really didnt wanna have to for this simple project), or till you make that refactor to Kysely, waiting for sequelize v8 next year wont work for me.

I tried moving the db outside the project, still doesnt work.

I’m not sure if this is normal or not, to be honest. The nearest node_modules should be resolved as far as I know. I just tried nesting a Nuxt project inside another Nuxt project (without Pruvious), and I’m seeing that Vite is resolving the node_modules from the parent project. When trying this setup with Pruvious, it does the same, but I don’t get the error message related to the font that you’re getting.

Come to think of it, do you have any node_modules in some parent directories (/home/<user>/Code)?

I recently fixed the duplicate dependencies issue in ebfc2a2c0b3eb42e3d5ae6b03a2890efaaae1084 (nuxi init now uses dependencies instead of devDependencies).

Regarding the issue you’re having, I’m unfortunately unable to provide a solution at the moment. If something pops up, I’ll let you know.

Some more things to try out:

  1. Try using nuxt dev in the dev script in package.json instead of pruvious dev.
  2. Can you try to build the project and run it locally with node .output/server/index.mjs?
  1. Is localhost:3000/dashboard accessible after the error is thrown?
  2. Did you install Pruvious with npx pruvious init <dir>?
  3. What operating system do you use?
  4. Does a fresh Nuxt installation (npx nuxi init <dir>) work on your machine?
  1. It is, kind of, it’s a blank white page and errors out with:
 ERROR  [unhandledRejection] socket hang up

  at connResetException (node:internal/errors:787:14)
  at Socket.socketOnEnd (node:_http_client:519:23)
  at Socket.emit (node:events:530:35)
  at endReadableNT (node:internal/streams/readable:1696:12)
  at process.processTicksAndRejections (node:internal/process/task_queues:82:21)


 ERROR  [unhandledRejection] read ECONNRESET

  at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
  1. Yes, thats the first method I tried, then I made a new nuxt project and added pruvious to it, same error.

  2. Sorry, I’m on Arch Linux x86_64, Kernel version 6.7.9-zen1-1-zen

  3. Yes, a fresh nuxt install works just fine