【问题标题】:Why does Angular give me this error, when I have needed modules?当我需要模块时,为什么 Angular 会给我这个错误?
【发布时间】:2020-11-01 00:49:28
【问题描述】:

当我尝试使用命令 ng 时,它给了我这个错误。

Unknown error: Error: Package exports for '\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\uuid' do not define a valid '.' target

我已经尝试卸载和安装 Angular,更新节点模块一切,但似乎没有解决这个问题

【问题讨论】:

  • 你的 NodeJS 版本是多少?
  • 你也可以试试 npm i -g uuid@latest

标签: angular module uuid


【解决方案1】:

Nodejs 版本 v13 对此有已知问题。尝试使用 v12.16.3 并且它正在工作。使用最新的 v14.5.0 或官方 LTS v12.16.3

仅供参考: 在命令提示符/终端上使用node -v 检查节点版本

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-14
    • 1970-01-01
    • 1970-01-01
    • 2017-12-08
    • 1970-01-01
    • 2014-08-31
    • 1970-01-01
    相关资源
    最近更新 更多