【问题标题】:Unable to install reactstrap from npm无法从 npm 安装 reactstrap
【发布时间】:2020-06-25 17:31:21
【问题描述】:

我正在学习 react 并第一次尝试使用 reactstrap。我已经使用以下命令安装了带有 npm 的 react 并得到了以下结果:

    npm install reactstrap
+ reactstrap@8.4.1
updated 1 package and audited 919281 packages in 10.948s

53 packages are looking for funding
  run `npm fund` for details

found 19 vulnerabilities (18 moderate, 1 high)

但是当我尝试运行应用程序时出现以下错误:

【问题讨论】:

  • 你需要在 reactstrap 周围加上引号:from 'reactstrap' 而不是 from reactstrap
  • 因为记得阅读实际错误:“Parsing error: Unexpected token”是告诉你有一个意外的令牌,例如你写了一些没有意义的东西。并不是说你写了一些确实有意义的东西,问题是 reactstrap 不知何故不可用。

标签: reactjs npm bootstrap-4 npm-install reactstrap


【解决方案1】:

我必须在单引号内加上 reactstrap,所以我使用 'reactstrap' 而不是 reactstrap,问题就解决了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-26
    • 2019-01-18
    • 2014-09-19
    • 2018-06-01
    • 1970-01-01
    • 2015-12-07
    • 1970-01-01
    相关资源
    最近更新 更多