JimmyLv / BibiGPT-v1

BibiGPT v1 · one-Click AI Summary for Audio/Video & Chat with Learning Content: Bilibili | YouTube | Tweet丨TikTok丨Dropbox丨Google Drive丨Local files | Websites丨Podcasts | Meetings | Lectures, etc. 音视频内容 AI 一键总结 & 对话:哔哩哔哩丨YouTube丨推特丨小红书丨抖音丨快手丨百度网盘丨阿里云盘丨网页丨播客丨会议丨本地文件等 (原 BiliGPT 省流神器 & AI课代表)
https://bibigpt.co
GNU General Public License v3.0
5.24k stars 702 forks source link

🐞 错误报告 Module not found: Can't resolve 'fs' #112

Closed warkcod closed 1 year ago

warkcod commented 1 year ago

错误描述 🤔

本地编译的时候遇到如下错误: error - ./node_modules/next/dist/compiled/@vercel/og/index.node.js:17950:0 Module not found: Can't resolve 'fs'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module: ./node_modules/next/dist/server/web/spec-extension/image-response.js ./node_modules/next/server.js ./node_modules/@supabase/auth-helpers-nextjs/dist/index.js ./pages/_app.tsx wait - compiling... error - ./node_modules/next/dist/compiled/@vercel/og/index.node.js:17950:0 Module not found: Can't resolve 'fs'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module: ./node_modules/next/dist/server/web/spec-extension/image-response.js ./node_modules/next/server.js ./node_modules/@supabase/auth-helpers-nextjs/dist/index.js ./pages/_app.tsx

请问有什么详细的说明?.env是从example里复制生成的,把相关内容字段填了,出现了如上错误 翻了前面报的bug貌似也有人提到这个问题,但是没有专门一个issue处理,麻烦看下?必要的话更新下相关说明,谢谢

Genuifx commented 1 year ago

同问。。。。

viryaka commented 1 year ago

如果你在客户端代码中使用了fs模块,你需要在你的package.json文件中设置browser.fs属性为false。例如:

{ "name": "my-app", "version": "1.0.0", "browser": { "fs": false }, "dependencies": { // ... } }

这样,Webpack就不会尝试在客户端打包fs模块了。

zhuhehuai commented 1 year ago

{ "name": "your-app-name", "version": "1.0.0", "dependencies": { // your dependencies }, "browser": { "fs": false } } 这样就可以了

JimmyLv commented 1 year ago

最新的代码已解决该问题