【问题标题】:Unable to figure out which npm dependency to resolve无法找出要解决的 npm 依赖项
【发布时间】:2022-12-12 08:03:43
【问题描述】:

我正在尝试使用 python 在 Alteryx 中创建一个工具。我正在按照他们的guide 中概述的步骤进行操作,但我正面临一个特定于 npm 的问题。

我四处寻找如何解决这个问题,但不明白需要安装哪个依赖项以及哪个目录合适等,希望在这方面提供任何帮助。

npm WARN ERESOLVE overriding peer dependency\n
npm WARN While resolving: @formatjs/intl@1.11.1\n
npm WARN Found: typescript@3.9.7\n
npm WARN node_modules/typescript\n
npm WARN   dev typescript@"3.9.7" from the root project\n
npm WARN   2 more (ts-loader, ts-loader)\n
npm WARN \n
npm WARN Could not resolve dependency:\n
npm WARN peerOptional typescript@"^4.2" from @formatjs/intl@1.11.1\n
npm WARN node_modules/@formatjs/intl\n
npm WARN   @formatjs/intl@"1.11.1" from react-intl@5.18.1\n
npm WARN   node_modules/react-intl\n
npm WARN \nnpm WARN Conflicting peer dependency: typescript@4.8.4\n
npm WARN node_modules/typescript\n
npm WARN   peerOptional typescript@"^4.2" from @formatjs/intl@1.11.1\n
npm WARN   node_modules/@formatjs/intl\n
npm WARN     @formatjs/intl@"1.11.1" from react-intl@5.18.1\n
npm WARN     node_modules/react-intl\nnpm ERR! code ERESOLVE\n
npm ERR! ERESOLVE could not resolve\n
npm ERR! \n
npm ERR! While resolving: react-intl@5.18.1\n
npm ERR! Found: typescript@3.9.7\n
npm ERR! node_modules/typescript\n
npm ERR!   dev typescript@"3.9.7" from the root project\n
npm ERR!   peer typescript@"*" from ts-loader@8.3.0\n
npm ERR!   node_modules/@alteryx/react-comms/node_modules/ts-loader\n
npm ERR!     ts-loader@"^8.0.14" from @alteryx/react-comms@1.0.0\n
npm ERR!     node_modules/@alteryx/react-comms\n
npm ERR!       @alteryx/react-comms@"^1.0.0" from the root project\n
npm ERR!   1 more (ts-loader)\n
npm ERR! \n
npm ERR! Could not resolve dependency:\n
npm ERR! peerOptional typescript@"^4.2" from react-intl@5.18.1\n
npm ERR! node_modules/react-intl\n
npm ERR!   react-intl@"^5.8.1" from the root project\n
npm ERR!   peer react-intl@"^5.8.1" from @alteryx/ui@1.0.0\n
npm ERR!   node_modules/@alteryx/ui\n
npm ERR!     @alteryx/ui@"^1.0.0" from the root project\n
npm ERR! \n
npm ERR! Conflicting peer dependency: typescript@4.8.4\n
npm ERR! node_modules/typescript\n
npm ERR!   peerOptional typescript@"^4.2" from react-intl@5.18.1\n
npm ERR!   node_modules/react-intl\n
npm ERR!     react-intl@"^5.8.1" from the root project\n
npm ERR!     peer react-intl@"^5.8.1" from @alteryx/ui@1.0.0\n
npm ERR!     node_modules/@alteryx/ui\n
npm ERR!       @alteryx/ui@"^1.0.0" from the root project\n
npm ERR! \n
npm ERR! Fix the upstream dependency conflict, or retry\n
npm ERR! this command with --force, or --legacy-peer-deps\n
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n
npm ERR! \n
npm ERR! See C:\\Users\\me\\AppData\\Local\\npm-cache\\eresolve-report.txt for a full report.\n\n
npm ERR! A complete log of this run can be found in:\n
npm ERR!     C:\\Users\\me\\AppData\\Local\\npm-cache\\_logs\\2022-10-09T11_02_33_206Z-debug-0.log\n'```

【问题讨论】:

    标签: python node.js npm macros alteryx


    【解决方案1】:

    react 依赖有一个 bug,alteryx 使用了 react 的遗留模块。

    创建SDK后,调整脚本..PythonPython38site-packagesyx_plugin_cliyx_workspacedoituild_tasksgenerate_artifact.py

    enter image description here

    而不是安装,设置安装 --legacy-peer-deps 并重新创建插件(删除旧插件)

    我希望,它会帮助你

    【讨论】:

      猜你喜欢
      • 2017-11-12
      • 2012-01-12
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      • 2020-07-28
      • 2017-12-30
      • 2023-02-02
      • 2021-06-22
      相关资源
      最近更新 更多