nodejs更新到18版本后API无法工作

问题描述 投票:0回答:1

我们最近更新了运行时 NodeJS 18,之后一个 api 失败并返回 500 内部服务器错误。

服务器也抛出此错误

TypeError: Failed to parse URL from
at .Request ( node:internal/deps/undici/undici:5272 )
at .mergeHeaders ( /layers/google.nodejs.yarn/yarn_modules/node_modules/@pnp/common-commonjs/net.js:9 )
at .SPHttpClient.<anonymous> ( /layers/google.nodejs.yarn/yarn_modules/node_modules/@pnp/sp-commonjs/sphttpclient.js:38 )
at .step ( /layers/google.nodejs.yarn/yarn_modules/node_modules/tslib/tslib.js:143 )
at .Object.next ( /layers/google.nodejs.yarn/yarn_modules/node_modules/tslib/tslib.js:124 )

我们正在调用 API 来获取共享点文件夹结构,因为该结构未加载到 UI 中并失败

但不确定 Api 到底在哪里失败以及如何解决这个问题。

node.js sharepoint nestjs pnp-js
1个回答
0
投票

错误消息表明解析 URL 时出现问题,这似乎发生在

@pnp/common
@pnp/sp
库中,这些库通常用于 Node.js 中的 SharePoint 操作。

© www.soinside.com 2019 - 2024. All rights reserved.