plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

[BUG] 🔴 ERROR | Could not resolve module "node:os"

Open pomcho555 opened this issue 1 year ago • 5 comments

What happened?

When updating plasmo from 0.76.3 to 0.82.1, cosmiconfig is also updated from 8.2.0 to 8.3.2([email protected]). And then I tried to build my extension though pnpm build after succession of pnpm dev. But I got the error belew while the build. BTW this error also came out with npm

[BUG] 🔴 ERROR  | Could not resolve module "node:os" from "/Users/john/workspace/project/node\_modules/.pnpm/[email protected]\[email protected]/node\_modules/cosmiconfig/dist/index.js"

As the workaround I downgrade the plasma and cosmiconfig to previous version I used by manually hard-coding package.json and pnpm-lock.json and it works somehow.

I don't know where the root-cause comes from but at least cosmiconfig version may cause something wrong on my laptop.

NOTE: I'm using Apple silicon but no idea it matters.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

  • [X] 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.

pomcho555 avatar Sep 03 '23 12:09 pomcho555

This is the main issue behind this. For me, downgrading to plasmo v0.75.3, as a workaround, seems to be working. Mind this is not an ideal solution.

smolak avatar Sep 03 '23 20:09 smolak

I have the same question? does this fixed??

Changlon avatar Sep 04 '23 05:09 Changlon

Will likely need to wait until upstream fix the dependency... or would someone wanna try putting up a PR forking that htmlnano optimizer? :d...

louisgv avatar Sep 04 '23 20:09 louisgv

So this fixed this which if applied in Plasmo, will get rid of the issue.

smolak avatar Sep 13 '23 13:09 smolak

I installed the latest (v0.83.0) and it's working (both dev and build tasks, using npm).

smolak avatar Sep 13 '23 13:09 smolak