简体   繁体   English

无法找出要解决的 npm 依赖项

[英]Unable to figure out which npm dependency to resolve

I am trying to create a tool in Alteryx, using python. I am following the steps outlined in their guide , and am facing a problem which is specific to npm.我正在尝试使用 python 在 Alteryx 中创建一个工具。我正在按照他们的 指南中概述的步骤进行操作,并且面临一个特定于 npm 的问题。

I have looked around on how to solve this, but don't understand which dependency needs to be installed and which directory would be suitable etc, would appreciate any help in this regard.我四处寻找如何解决这个问题,但不明白需要安装哪个依赖项以及哪个目录合适等,希望在这方面提供任何帮助。

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'```

There is a bug in react dependencies, alteryx uses legacy modules of react. react 依赖有一个 bug,alteryx 使用了 react 的遗留模块。

After creation SDK, adjust the script..Python\Python38\site-packages\ayx_plugin_cli\ayx_workspace\doit\build_tasks\generate_artifact.py创建SDK后,调整脚本..Python\Python38\site-packages\ayx_plugin_cli\ayx_workspace\doit\build_tasks\generate_artifact.py

enter image description here在此处输入图像描述

instead of "install", set "install --legacy-peer-deps" and recreate plugin(delete the old one)而不是“安装”,设置“安装--legacy-peer-deps”并重新创建插件(删除旧插件)

I hope, it will help you我希望,它会帮助你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM