question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dev server frequently freezes when using NX and Prisma

See original GitHub issue

Environment

  • Operating System: Windows_NT
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: npm@8.3.1
  • Builder: vite
  • User Config: typescript
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/rdmchr/Rose/tree/vite

  • Clone the repo
  • Switch to the vite branch
  • Run npm i
  • Create a .env file with the following content:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
  • Run npm run dev
  • Open the index page in your browser
  • Wait ~2 minutes
  • Reload the tab

Describe the bug

After some time the Vite dev server no longer responds to requests. Requests sent to the server neither load nor time out. This affects both frontend and server URLs.

There are no errors in the vite console nor in the browser console.

Additional context

No response

Logs

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
cawa-93commented, May 16, 2022

I have similar issue with Nuxt 3.0.0-rc.3. Here my reproduction repo.

I Call Prisma in single server api: https://github.com/cawa-93/nuxt-prisma-hmr-issue/blob/e42d72ca6fd6226601971f6001a9342764e9f45a/server/api/users.ts

FIrst time request to /api/users return [] as expected. But after HMR server gets stuck or crashes


Operating System: `Windows 10`
Node Version: v16.14.0
Nuxt Version: 3.0.0-rc.3
Package Manager: npm@8.3.1
Builder: vite
User Config: typescript
Runtime Modules: -
Build Modules: -
1reaction
rdmchrcommented, Apr 29, 2022

It must come from Windows. I don’t have this problem on Linux

So switching to WSL could at least be a temporary workaround?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration troubleshooting in development - Prisma
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database.
Read more >
Remix Crash Course | Full Stack React - Remix Guide
This is an intro to the Remix Run framework. We build a blog app with Prisma and Sqlite. Part 2: User Auth -...
Read more >
npm hangs on postinstall / unlock - Stack Overflow
Sometimes it works, sometimes not and most of the times it hangs on a different module. On my dev machine (which is in...
Read more >
Learn from 425 web development courses on egghead
Almost every React application needs to fetch data from a server and cache the result between ... Build High-Speed Monorepos with Nx and...
Read more >
TypeORM Sucks!! Something I wanted to talk about since long!
Entity Manager is of no use ... We use it frequently. ... I think what nesarkvechnep means is that developers should have more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found