美文网首页
解决 windows10 BROWSER=none 错误

解决 windows10 BROWSER=none 错误

作者: _lin_ | 来源:发表于2020-09-02 18:41 被阅读0次

    package.json

    ....
    "scripts": {
        "start": "BROWSER=none react-app-rewired start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
      },
    ....
    

    其中在window10 环境下, BROWSER=none 会出错
    解决办法

    npm install cross-env --save-dev
    

    修改packge.json

    ....
    "scripts": {
        "start": "cross-env BROWSER=none react-app-rewired start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
      },
    ....
    

    cross-env 解决一些跨平台环境变量的问题

    相关文章

      网友评论

          本文标题:解决 windows10 BROWSER=none 错误

          本文链接:https://www.haomeiwen.com/subject/biwwsktx.html