npm run start with “DEBUG=*” issue on Windows

余生颓废 提交于 2021-01-28 03:51:38

问题


{
  "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:


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"



来源:https://stackoverflow.com/questions/45673408/npm-run-start-with-debug-issue-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!