Closed nextone2271 closed 9 months ago
Steps to reproduce:
pnpm install
pnpm add langchain youtube-transcript youtubei.js
import { YoutubeLoader } from 'langchain/document_loaders/web/youtube' console.log(YoutubeLoader)
pnpm dev
hmr error - node_modules/.pnpm/centra@2.6.0/node_modules/centra/model/CentraRequest.js:2:13 Module not found: Can't resolve 'http'
Note: it does appear to work with a regular create-next-app project. Please advise. Thanks in advance!
Apparently the error comes from having the line:
export const runtime = 'edge'
Removing this line to switch to the Node.js runtime resolved the issue.
Steps to reproduce:
pnpm install
pnpm add langchain youtube-transcript youtubei.js
(as per langchain docs)pnpm dev
hmr error - node_modules/.pnpm/centra@2.6.0/node_modules/centra/model/CentraRequest.js:2:13 Module not found: Can't resolve 'http'
Note: it does appear to work with a regular create-next-app project. Please advise. Thanks in advance!