error('relativeUrl 不是字符串类型'); } 在这个示例中,我们首先检查 relativeUrl 是否为字符串类型,如果是,则使用 replace 方法处理它,并拼接成完整的 URL。如果 relativeUrl 不是字符串类型,则打印错误信息。这样可以有效避免 relativeURL.replace is not a function 的错误。
Running a Lambda function that calls axios to hit a Workfront API and getting an error: 2016-12-22T15:59:05.264Z ced2f412-ccbd-4d5c-b87b-2127fcc0a773 TypeError: relativeURL.replace is not a function at combineURLs (/var/task/node_modules/axios/lib/helpers/combineURLs.js:11:58) at ...