Skip to content

Run "pnpm dev &" seems not working #52

Answered by kwchang0831
RBVoidLin asked this question in Q&A
Discussion options

You must be logged in to vote

My env:

  • System:
    • OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)

My first attempt was trying to reproduce your situation.

pnpm dev &

  VITE v4.1.4  ready in 2041 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: (Omitted)

Right after, check the job state.

jobs -l

Job     Group   CPU     State   Command
1       32655   2%      stopped pnpm dev &

I cannot get it to work as background process this way.

My second attempt was to try pm2.

This works, I can run pnpm dev as background process.
This is how I did it.

Install pm2 using npm globally.

npm i pm2 -g

Run pnpm dev with pm2. (be sure to be in the right directory)

pm2 start "pnpm dev" --name QWER

Check jobs deta…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RBVoidLin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
not-bug Not a Bug
2 participants