You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法找到node-fetch模块报错求助:运行TikTok下载器遇此问题

未捕获错误 Error: 找不到模块 'node-fetch'
依赖调用栈:

  • c:\Users\As\Desktop\tiktok-downloader-main\index.js
    在 Module._resolveFilename (internal/modules/cjs/loader:956:15)
    在 Module._load (internal/modules/cjs/loader:804:27)
    在 Module.require (internal/modules/cjs/loader:1028:19)
    在 require (internal/modules/cjs/helpers:102:18)
    在 (c:\Users\As\Desktop\tiktok-downloader-main\index.js:6:15)
    在 Module._compile (internal/modules/cjs/loader:1126:14)
    在 Module._extensions..js (internal/modules/cjs/loader:1180:10)
    在 Module.load (internal/modules/cjs/loader:1004:32)
    在 Module._load (internal/modules/cjs/loader:839:12)
    在 executeUserEntryPoint (internal/modules/run_main:81:12)
    在 (internal/main/run_main_module:17:47)
解决方法
  • 打开命令提示符(CMD),切换到项目所在文件夹:cd c:\Users\As\Desktop\tiktok-downloader-main
  • 运行安装命令补全依赖:npm install node-fetch
  • 若你的Node.js版本是18及以上,无需额外安装,可直接修改index.js第6行代码:把const fetch = require('node-fetch')替换成const fetch = global.fetch,或者直接使用fetch即可

内容的提问来源于stack exchange,提问作者yeah

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 15:39:20