daily-code icon indicating copy to clipboard operation
daily-code copied to clipboard

bug: ./setupDB.sh script in Git Bash gives MODULE_NOT_FOUND error when Local Docker setup is chosen in Windows

Open rakeshs51 opened this issue 1 year ago • 3 comments

Describe the bug When Local DB with Docker is chosen for Database setup, I get the error, Error: Cannot find module 'D:\Code\100x\daily-code-main\node_modules\node_modules\prisma\build\index.js'

Since this error comes after Migrating DB log, this means it is produced by npx prisma migrate dev command.

Possible Solutions Tried:

  • Deleting node_modules
  • Reinstalling node js

To Reproduce Steps to reproduce the behavior:

  1. I am using Windows Machine
  2. run ./setupDB.sh command inside Git Bash in rootDir/packages/db directory
  3. Select Local DB with Docker Setup as config
  4. An error saying Error: Cannot find module 'D:\Code\100x\daily-code-main\node_modules\node_modules\prisma\build\index.js' pops up.

Expected behavior The project should run locally at the expected port.

Screenshots or GIFs image

Info (please complete the following information):

  • Edge
  • Editor: VS Code

Additional context

rakeshs51 avatar May 05 '24 19:05 rakeshs51

I am also facing the same issue right now, does anyone know the fix ?

Amarprasad33 avatar May 06 '24 17:05 Amarprasad33

replace npx with yarn inside your setupDB.sh

image

iharsh02 avatar May 08 '24 13:05 iharsh02

@iharsh02 thank you, I was also facing the same issue. now solved

vr1Ravi avatar May 14 '24 12:05 vr1Ravi

hey guys 👋 after using the fix provided by @iharsh02, I found that this fix will only for an offline set-up of the project and will cause errors when using docker compose watch, so use this fix iff when setting the project offline.

vanshaj-sharma avatar Jul 01 '24 08:07 vanshaj-sharma