0

I am trying to start a react and node based application that works fine in mac systems, but when I am trying to start in windows, it's throwing an error.

The command to start is - yarn start:all

The script entries in package.json file are -

"scripts": {
    "docs": "jsdoc2md src/*.js src/**/*.js > API.md",
    "build:dev": "better-npm-run build:dev",
    "build:production": "better-npm-run build:production",
    "style": "eslint --fix --ext .js,.jsx src config",
    "unit": "cross-env LOG_LEVEL=warn jest",
    "coverage": "cross-env LOG_LEVEL=warn helix test --coverage",
    "test": "yarn style && yarn coverage",
    "start:inspect": "nodemon --inspect .",
    "eject": "helix eject",
    "start": "better-npm-run start:stage",
    "start:ordersPresentationStage": "micro_cancellations_path=http://localhost:3001/cancellations/micro yarn --cwd ../orders-presentation-helix startStage",
    "start:laptopProxyServer": "node tools/laptopDevProxyServer.js",
    "start:all": "concurrently --kill-others -n proxy,orders,cancellation \"yarn start:laptopProxyServer\" \"yarn start:ordersPresentationStage\" \"yarn start\"",
    "start:production": "yarn run build:production && cross-env ASSET_PATH=/cancellationspres/assets/ NODE_ENV=production node .",
    "build-stats:development": "yarn start -- --analyze",
    "build-stats:production": "yarn build -- --analyze",
    "generate:component": "helix generate:component",
    "clean": "rimraf ./build",
    "std-version": "standard-version"
  },

The error that I am getting is - 'micro_cancellations_path' is not recognized as an internal or external command, operable program or batch file.

I assume the start:ordersPresentationStage part of scripts is unable to execute because the line cannot be processed in windows system, but I am not able to find an alternative statement for the same. Please help!

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Sagnik Sinha
  • 11
  • 1
  • 2
  • That's not how you set environment variables in Windows - if you need this to work cross-platform, look into e.g. `cross-env`. – jonrsharpe Mar 16 '21 at 11:34
  • 1
    Does this answer your question? ["NODE\_ENV" is not recognized as an internal or external command, operable command or batch file](https://stackoverflow.com/questions/11928013/node-env-is-not-recognized-as-an-internal-or-external-command-operable-comman) – jonrsharpe Mar 16 '21 at 11:35

0 Answers0