PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
8.86k stars 315 forks source link

[BUG] "Cannot find module 'node:stream'" when use LuanRT / YouTube.js #960

Open zshnb opened 2 months ago

zshnb commented 2 months ago

What happened?

Hello, I want to use YouTube.js to download video in extension, when I installed dependency then call api in extension, I got error "Cannot find module 'node:stream'", I want to know how can I use this lib in plasmo framework?

reproduce step is here:

  1. install YouTube.js
  2. call YouTube.js api
  3. report error

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

🔴 ERROR  | Build failed. To debug, run plasmo dev --verbose.
🔴 ERROR  | Failed to resolve 'node:stream' from './node\_modules/.pnpm/@fastify+busboy@2.1.1/node\_modules/@fastify/busboy/lib/main.js'
🔴 ERROR  | Cannot find module 'node:stream'
🔴 ERROR  | Resolvers must return an absolute path, @plasmohq/parcel-resolver-post returned: node:stream

(OPTIONAL) Contribution

Code of Conduct

jiweiyuan commented 2 months ago

Same Problem, could you please update the version of Parcel

jiweiyuan commented 2 months ago

@zshnb this problem might because parcel version, could you please try upgrade the version of parcel when you're convenient

zshnb commented 2 months ago

@zshnb this problem might because parcel version, could you please try upgrade the version of parcel when you're convenient

Hi sorry for reply later, I don't see parcel in my package.json, how can I update it?

zshnb commented 1 month ago

@jiweiyuan Hi could you please help me about this problem?

jiweiyuan commented 1 month ago

Sorry, I think this might be the Plasmo’s problem. Plasmo should update its parcel version. In fact, I am waiting author updates it’s version

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Sleek Zheng @.> Sent: Friday, May 24, 2024 3:50:34 AM To: PlasmoHQ/plasmo @.> Cc: Jiwei,Yuan @.>; Mention @.> Subject: Re: [PlasmoHQ/plasmo] [BUG] "Cannot find module 'node:stream'" when use LuanRT / YouTube.js (Issue #960)

@jiweiyuanhttps://github.com/jiweiyuan Hi could you please help me about this problem?

— Reply to this email directly, view it on GitHubhttps://github.com/PlasmoHQ/plasmo/issues/960#issuecomment-2128397874, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQTJJGAAXQCZJY65OQZ6NTZD2THVAVCNFSM6AAAAABGYQWD4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRYGM4TOOBXGQ. You are receiving this because you were mentioned.Message ID: @.***>

louisgv commented 1 month ago

See #813 - I'm blocked by this since last year, if anyone wanna take a quick stab at it, that'd be great!

zshnb commented 1 month ago

See #813 - I'm blocked by this since last year, if anyone wanna take a quick stab at it, that'd be great!

thanks, so we need plasmo to do the upgrade right? does anyone can help to merge this pr?

zshnb commented 1 month ago

@louisgv or can we try mention plasmo's member to help merge this?