【问题标题】:Unrecognized token in source text源文本中无法识别的标记
【发布时间】:2020-07-29 14:32:21
【问题描述】:

有人可以帮我解决这个问题吗?我真的不知道为什么会这样。

Unrecognized token in source text.
At line:1 char:13
+ npm install  <<<< @babel/core @babel/cli --save-dev
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnrecognizedToken
 

【问题讨论】:

  • 使用 'git bash' 而不是 PowerShell 解决了我在 Windows 上的问题
  • 嘿@AMD,您可以将您的评论作为新答案,因为它对我有用!谢谢。

标签: npm babeljs


【解决方案1】:

遇到同样的错误。您可以尝试将包含 at 符号的文本括在撇号 (') 中,如下所示:

npm install --save-dev '@babel/core' '@babel/cli'

在这里找到答案:https://github.com/ng-select/ng-select/issues/1114

【讨论】:

    【解决方案2】:

    希望您从 npm 提示符运行以下内容

    npm install --save-dev @babel/core @babel/cli
    

    【讨论】:

      猜你喜欢
      • 2015-11-15
      • 2016-10-28
      • 2013-04-02
      • 2021-03-23
      • 2020-03-28
      • 1970-01-01
      • 2015-10-04
      • 1970-01-01
      相关资源
      最近更新 更多