daily-code
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
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:
- I am using Windows Machine
- run ./setupDB.sh command inside Git Bash in rootDir/packages/db directory
- Select Local DB with Docker Setup as config
- 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
Info (please complete the following information):
- Edge
- Editor: VS Code
Additional context
I am also facing the same issue right now, does anyone know the fix ?
replace npx with yarn inside your setupDB.sh
@iharsh02 thank you, I was also facing the same issue. now solved
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.