dub icon indicating copy to clipboard operation
dub copied to clipboard

Local development setup error on Windows - can't start dev server

Open manish-pali opened this issue 1 year ago • 6 comments

Hi there ,

I'm trying to set up Dub in local dev env on Windows 11

When i run pnpm dev getting this error and ERROR run failed: command exited (1)

error

I found react-email was the problem so removed "email dev --port 3333" from dev script in apps/web

Server started but then I get Build Error

next js error

Changing postcss.config.js extention to postcss.config.cjs helps

It would be much appreciated if someone could help me with email cli problem

manish-pali avatar May 11 '24 19:05 manish-pali

I'm using Windows 10 and [email protected] and facing the same issue. Hope someone fixes this soon.

NirbhaySirsikar avatar May 14 '24 08:05 NirbhaySirsikar

You can try setting up on wsl worked for me.

shreyash010 avatar May 16 '24 03:05 shreyash010

@shreyash010 I tried setting up docker and the project in wsl but it takes forever to load localhost:8888. Can you please tell me what sequence of steps you took to setup the project successfully.

NirbhaySirsikar avatar May 19 '24 12:05 NirbhaySirsikar

Hi, @manish-pali, I fixed this issue in my system. It was a very silly mistake from my end though.

I created .env file in dub/ directory instead of dub/apps/web directory. There's also a .env.example file for reference. Once .env file was moved, all of my error were fixed.

If this works for you too you can close the issue.

NirbhaySirsikar avatar May 23 '24 11:05 NirbhaySirsikar

Hello, @NirbhaySirsikar, good to hear that it worked for you but I already placed my .env file in the right place dub

manish-pali avatar May 24 '24 18:05 manish-pali

@manish-pali , Additional to that, closing instances of any localhost:3334 and localhost:8888 did work for me. Also, let the script run without interfering with the system.

It works 80% of the time. If it doesn't I restart my terminal because sometimes files are resource locked.

NirbhaySirsikar avatar May 25 '24 22:05 NirbhaySirsikar

I'd suggest building the packages before starting the dev server. Steps that worked for me:

  1. cd dub/packages/utils
    pnpm install pnpm build
  2. cd dub/packages/ui pnpm install pnpm build
  3. cd dub/apps/web pnpm install pnpm build npm run dev

Given the app/web is not declaring the utils and ui package as transpile package and is picking up the exports from dist folder (package.json of repective packages), building the packages is required. Atleast thats what my understanding is.

I am able to run the server on loca

Screenshot 2024-06-17 at 3 32 37 PM

satwant007 avatar Jun 17 '24 10:06 satwant007