我只是使用我得到了
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Alex\Desktop\rollbot\node_modules\node-fetch\src\index.js from C:\Users\Alex\Desktop\rollbot\index.jsInstead change the require of C:\Users\Alex\Desktop\rollbot\node_mo
我想知道是否有一种方法可以为ES模块使用一种条件导入,其工作方式如下:else import fetch from node-fetch import fetch from 'node-fetch'fetch(url).then(res => ...)然后我使用fetcher作为提取。fetch) {
c
所以我在TypeScript中使用Firebase的云函数import * as fetch from "node-fetch";当我尝试像这样使用/node_modules/node-fetch/@types/index")' has no call signatures.我想知道是否需要在运行之后添加一个依赖项:因为在我的package.json