2
votes

{
  "name": "apokidsi",
  "version": "0.717",
  "contributors": [
  ],
  "dependencies": {
    "angular": "1.5.8",
    "angular-cookies": "1.5.8",
    "angular-messages": "1.5.8",
    "angular-ui-router": "1.0.0-beta.3",
    "debug": "^3.0.0",
    "flag-icon-css": "2.8.0",
    "jquery": "3.2.1",
    "moment": "2.18.1",
    "moment-timezone": "0.5.13",
    "node-fetch-npm": "^2.0.1"
  },
  "scripts": {
    "clean": "gulp clean",
    "start": "DEBUG=true HOST=localhost:4200 gulp server",
}
}

Here is the package.json file.
When I run npm run start
I get this message
'DEBUG' is not recognized as an internal or external command, operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1

1
npm run start basically runs your start command. Meaning, it is same as running DEBUG=true HOST=localhost:4200 gulp server command in your terminal.user1741851
but I do not understand that DEBUG and HOST parameter.B. Raut
How windows will know the DEBUG and HOST is the recognise command in npm. I tried SET DEBUG=* but It did not worked.B. Raut

1 Answers

3
votes

After checking all the possibilities we have to use the cross-env dependencies.

so install npm install cross-env --save-dev

and in package.json

"Start": " cross-env-shell DEBUG=True HOST=dev.example.com gulp server"