npm run从"DEBUG = *"开始Windows上的问题 [英] npm run start with "DEBUG=*" issue on Windows

查看:65
本文介绍了npm run从"DEBUG = *"开始Windows上的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

{
  "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",
}
}

这是package.json文件.
当我运行 npm运行开始
我收到此消息
"DEBUG"无法识别为内部或外部命令,可操作的程序或批处理文件.
npm ERR!代码ELIFECYCLE
npm ERR!errno 1

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

推荐答案

在检查了所有可能性之后,我们必须使用跨环境依赖项.

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

因此安装npm install cross-env --save-dev

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

和package.json中的

and in package.json

开始":"cross-env-shell DEBUG = True HOST = dev.example.com gulp服务器"

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

这篇关于npm run从"DEBUG = *"开始Windows上的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆