【问题标题】:How Can I Resolve An 'npm Warn' When Using 'create-react-app'?使用“create-react-app”时如何解决“npm 警告”?
【发布时间】:2017-08-23 15:38:33
【问题描述】:

我在使用“create-react-app”时收到以下警告:npm WARN prefer global marking@0.3.6 should be installed with -g

我怎样才能摆脱这个警告?

我查看了“可能已经有你答案的问题”,但似乎没有找到准确的答案。不过,我是新手,可能忽略了显而易见的事情。

我的安装是:

$ npm -v
4.3.0

$ node --version
v7.0.0

$ npm list -g create-react-app
/usr/local/lib
└── create-react-app@1.2.1

$ npm list -g marked@
/usr/local/lib
└── marked@0.3.6

在我看来,这个包已经全局安装了。

我运行了以下内容:

$ sudo npm update -g create-react-app

结果如下:

$ npm list -g create-react-app
/usr/local/lib
└── create-react-app@1.3.0

但是,我仍然得到:

npm WARN prefer global marked@0.3.6 should be installed with -g

【问题讨论】:

    标签: node.js reactjs npm warnings create-react-app


    【解决方案1】:

    因为该软件包包含 CLI。

    尝试删除create-react-app并将其安装到最新版本1.3.0

    npm install -g create-react-app

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-05
      • 2021-08-11
      • 1970-01-01
      • 1970-01-01
      • 2021-12-28
      • 1970-01-01
      • 2018-05-02
      • 2019-05-09
      相关资源
      最近更新 更多