gpt4 book ai didi

javascript - TSLint 在本地抛出 'error TS2459: Module '“@azure/core-tracing "' declares ' Span,但未导出。”和其他错误

转载 作者:行者123 更新时间:2023-12-05 06:00:23 37 4
gpt4 key购买 nike

我不知道从哪里开始修复这个错误。除了听起来“@azure/ai-text-analytics”安装有问题外,输出并没有真正告诉我很多信息。我已经 npm uninstall 了两次并重新安装了两次。它给出了同样的错误,所以我猜这不是安装?

我得到的完整错误:

node_modules/@azure/core-http/types/latest/src/createSpanLegacy.d.ts:1:10 - error TS2459: Module '"@azure/core-tracing"' declares 'Span' locally, but it is not exported.

1 import { Span } from "@azure/core-tracing";
~~~~

node_modules/@azure/core-tracing/types/core-tracing.d.ts:6:10
6 import { Span } from '@opentelemetry/api';
~~~~
'Span' is declared here.

node_modules/@azure/core-http/types/latest/src/webResource.d.ts:9:23 - error TS2305: Module '"@azure/core-tracing"' has no exported member 'Context'.

9 import { SpanOptions, Context } from "@azure/core-tracing";
~~~~~~~


Found 2 errors.

显然,这些文件都不是我自己的代码,所以我没有任何其他我能想到的东西可以展示。

最佳答案

我在 GitHub 支持方面获得了帮助。这是 link到答案。

I did more debugging and it looks like the TypeScript compiler is trying to build the d.ts files inside node_modules which is causing the build failure. Looks like using the paths option in your tsconfig.json file caused this issue and when I removed it, the project built just fine with core-http@1.2.4.

关于javascript - TSLint 在本地抛出 'error TS2459: Module '“@azure/core-tracing "' declares ' Span,但未导出。”和其他错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67688588/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com