plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

[BUG] Cannot find module xxx in background script when running the pnpm built package

Open AkoWu101 opened this issue 1 year ago • 3 comments

What happened?

Plasmo version: 0.89.3 node version: 20.3.1

i import 3rd party library in the background script. after run pnpm build, load the package.

Will have error "Cannot find module xxx"

Version

Latest

What OS are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Relevant log output

No response

(OPTIONAL) Contribution

  • [ ] I would like to fix this BUG via a PR

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct
  • [X] I checked the current issues for duplicate problems.

AkoWu101 avatar Oct 19 '24 03:10 AkoWu101

hey, did you figure this out yet - I have a similar problem within the content scripts...

HansBhatia avatar Oct 24 '24 17:10 HansBhatia

I used content scripts to create a div in the page, and in this div I imported mermaid to create a svg. There is also this error in 'newRequire' method.

huweihong avatar Dec 25 '24 07:12 huweihong

same problem

winjeysong avatar Feb 13 '25 12:02 winjeysong