skip to Main Content

I need to run two yarn packages in Windows Command, which contain two react package modules.
This works succesfully in Mac Ubuntu.

yarn dev -p ""+(app-one|app-two)""

However, it does not work in Windows.

I tried referencing answer https://stackoverflow.com/a/64937839/15435022, however it does not work. What is the proper command to run two packages simulataneously in Windows?

Package Json:

"scripts": {
   "dev": "yarn compile:packages && node concurrently-dev.js",

Command Line Tests:

yarn dev -p ""+(app-one|app-two)""
yarn dev -p "app-one" "app-two"
yarn dev -p "app-one" "app-two"
yarn dev -p "app-one" & yarn dev -p "app-one"

2

Answers


  1. I recommend you to use the concurrently package. Simply install it using yarn add concurrently and update your package.json like this:

    "scripts": {
       "dev": "concurrently "yarn compile:packages" "node concurrently-dev.js"",
       ...
    }
    
    Login or Signup to reply.
  2. Try:

    yarn start dev -p "app-one" "app-two"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search