PlasmoHQ / plasmo

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

[BUG] Expected '>', got 'className' when running plasmo and React jsx #751

Open Kurolox opened 1 year ago

Kurolox commented 1 year ago

What happened?

Running Plasmo v0.82.5. The error is not exclusive to that particular file, but there is something wrong going on with jsx parsing, plasmo seems to expect some jsx tags to be inmediately closed without any props.

Here's an example (it's the one mentioned in the logs attached)

image

To give a bit more context, that's the react-bootstrap Overlay component, which is expected to have props. Even if I get rid of this specific issue by removing all props to see if at least it would compile, plasmo only complains about a different file, so it doesn't seem to be related to the components themselves

Any idea about what could be causing this issue?

Version

Latest

What OS are you seeing the problem on?

Linux

What browsers are you seeing the problem on?

No response

Relevant log output

> plasmo dev --verbose

🟑 0      | Running command: dev
🟣 Plasmo v0.82.5
πŸ”΄ The Browser Extension Framework
πŸ”΅ INFO   | Starting the extension development server...
🟑 1      | Starting dev server on localhost:39667, HMR on localhost:1815...
🟑 2      | Creating Manifest Factory...
🟑 3      | Ensure exists: /home/kuro/projects/browser-extension/.plasmo
🟑 4      | Plasmo updated, busting cache...
🟑 5      | /home/kuro/projects/browser-extension/assets/icon512.png found, creating resized icons
🟑 6      | Creating static templates for popup
🟑 7      | Creating static templates for options
🟑 8      | Creating static templates for newtab
🟑 9      | Creating static templates for devtools
🟑 10     | Creating static templates for sidepanel
🟑 11     | Parsed config: {
  matches: [
    'https://example.com/*',
  ]
}
🟑 12     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/default.tsx
🟑 13     | Creating content script mount for contents
🟑 14     | Parsed config: { matches: [ 'https://www.example.com/*' ] }
🟑 15     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/linkedin.tsx
🟑 16     | Creating content script mount for contents
🟑 17     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/configs/index.ts
🟑 18     | { messageHandlerList: [], portHandlerList: [] }
🟑 19     | Creating BGSW entry
🟑 20     | Hash changed, updating manifest
🟑 21     | Watching the following files: Set(135) {
  '/home/kuro/projects/browser-extension/package.json',
  '/home/kuro/projects/browser-extension/src/.env.chrome.local',
  '/home/kuro/projects/browser-extension/src/.env.dev.local',
  '/home/kuro/projects/browser-extension/src/.env.development.local',
  '/home/kuro/projects/browser-extension/src/.env.local',
  '/home/kuro/projects/browser-extension/src/.env.chrome',
  '/home/kuro/projects/browser-extension/src/.env.dev',
  '/home/kuro/projects/browser-extension/src/.env.development',
  '/home/kuro/projects/browser-extension/src/.env',
  '/home/kuro/projects/browser-extension/src/content.chrome.ts',
  '/home/kuro/projects/browser-extension/src/content.development.ts',
  '/home/kuro/projects/browser-extension/src/content.ts',
  '/home/kuro/projects/browser-extension/src/content.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/content.development.tsx',
  '/home/kuro/projects/browser-extension/src/content.tsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/content.development.jsx',
  '/home/kuro/projects/browser-extension/src/content.jsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.js',
  '/home/kuro/projects/browser-extension/src/content.development.js',
  '/home/kuro/projects/browser-extension/src/content.js',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.development.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.js',
  '/home/kuro/projects/browser-extension/src/sandbox.development.js',
  '/home/kuro/projects/browser-extension/src/sandbox.js',
  '/home/kuro/projects/browser-extension/src/background.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background.development.ts',
  '/home/kuro/projects/browser-extension/src/background/index.development.ts',
  '/home/kuro/projects/browser-extension/src/background.ts',
  '/home/kuro/projects/browser-extension/src/background/index.ts',
  '/home/kuro/projects/browser-extension/src/background.chrome.js',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.js',
  '/home/kuro/projects/browser-extension/src/background.development.js',
  '/home/kuro/projects/browser-extension/src/background/index.development.js',
  '/home/kuro/projects/browser-extension/src/background.js',
  '/home/kuro/projects/browser-extension/src/background/index.js',
  '/home/kuro/projects/browser-extension/src/popup.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.tsx',
  '/home/kuro/projects/browser-extension/src/popup.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.jsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options.development.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/options.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.tsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options.development.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/options.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.jsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.development.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.chrome.jsx',
  ... 35 more items
}
πŸ”΅ INFO   | Loaded environment variables from: []
🟑 0      | Reinitializing remote cache directory
🟑 0      | @plasmohq/parcel-transformer-manifest
🟑 1      | Adding icons
🟑 2      | Adding default_icon
🟑 3      | Adding page
🟑 4      | Handling background scripts
🟑 5      | Handling background service worker
πŸ”΄ ERROR  | Expected '>', got 'target'
🟑 22     | /home/kuro/projects/browser-extension/node_modules/.pnpm/file+..+react_@types+react-dom@18.2.7_@types+react@18.2.21_redux@4.2.1/node_modules/anotherProject/src/components/customTooltip/clickTooltip.tsx:26:13

(OPTIONAL) Contribution

Code of Conduct

louisgv commented 1 year ago

That's very weird... afaik we didn't change any deps related to js parsing :-?

louisgv commented 1 year ago

@Kurolox if you revert back to v0.82.1, does it work?

Kurolox commented 1 year ago

The more I'm looking into this, the more of a nightmare its becoming. It seems like the package manager used influences the outcome

NPM PNPM Yarn
v0.65.3 βœ… ❌ ❌
v0.66.0 βœ… ? ?
v0.67.0 ❎2 ? ?
v0.75.3 ❎2 ❌ ❌
v0.80.0 βœ… ? ?
v0.81.1 βœ… ? ?
v0.82.0 βœ… ❌ ❌
v0.82.5 ❎1 ❌ ❌
v0.82.5 (again?) βœ… ❌ ❌

Legend:

Here are the relevant logs for the third category.

1: NOTE: This has been fixed, it was caused due to the alias section in the package.lock

🟣 Plasmo v0.82.5
πŸ”΄ The Browser Extension Framework
πŸ”΅ INFO   | Starting the extension development server...
🟑 1      | Starting dev server on localhost:41277, HMR on localhost:1815...
🟑 2      | Creating Manifest Factory...
🟑 3      | Loaded env from .env
🟑 4      | Ensure exists: /home/kuro/projects/browser-extension/.plasmo
🟑 5      | /home/kuro/projects/browser-extension/assets/icon512.png found, creating resized icons
🟑 6      | Loaded env from .env
🟑 7      | Creating static templates for popup
🟑 8      | Creating static templates for options
🟑 9      | Creating static templates for newtab
🟑 10     | Creating static templates for devtools
🟑 11     | Creating static templates for sidepanel
🟑 12     | Parsed config: {
  matches: [
    'https://example.com/*',
  ]
}
🟑 13     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/default.tsx
🟑 14     | Creating content script mount for contents
🟑 15     | Parsed config: { matches: [ 'https://www.example.com/*' ] }
🟑 16     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/example.tsx
🟑 17     | Creating content script mount for contents
🟑 18     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/configs/index.ts
🟑 19     | { messageHandlerList: [], portHandlerList: [] }
🟑 20     | Creating BGSW entry
🟑 21     | Hash changed, updating manifest
🟑 22     | Watching the following files: Set(135) {
  '/home/kuro/projects/browser-extension/package.json',
  '/home/kuro/projects/browser-extension/src/.env.chrome.local',
  '/home/kuro/projects/browser-extension/src/.env.dev.local',
  '/home/kuro/projects/browser-extension/src/.env.development.local',
  '/home/kuro/projects/browser-extension/src/.env.local',
  '/home/kuro/projects/browser-extension/src/.env.chrome',
  '/home/kuro/projects/browser-extension/src/.env.dev',
  '/home/kuro/projects/browser-extension/src/.env.development',
  '/home/kuro/projects/browser-extension/src/.env',
  '/home/kuro/projects/browser-extension/src/content.chrome.ts',
  '/home/kuro/projects/browser-extension/src/content.development.ts',
  '/home/kuro/projects/browser-extension/src/content.ts',
  '/home/kuro/projects/browser-extension/src/content.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/content.development.tsx',
  '/home/kuro/projects/browser-extension/src/content.tsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/content.development.jsx',
  '/home/kuro/projects/browser-extension/src/content.jsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.js',
  '/home/kuro/projects/browser-extension/src/content.development.js',
  '/home/kuro/projects/browser-extension/src/content.js',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.development.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.js',
  '/home/kuro/projects/browser-extension/src/sandbox.development.js',
  '/home/kuro/projects/browser-extension/src/sandbox.js',
  '/home/kuro/projects/browser-extension/src/background.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background.development.ts',
  '/home/kuro/projects/browser-extension/src/background/index.development.ts',
  '/home/kuro/projects/browser-extension/src/background.ts',
  '/home/kuro/projects/browser-extension/src/background/index.ts',
  '/home/kuro/projects/browser-extension/src/background.chrome.js',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.js',
  '/home/kuro/projects/browser-extension/src/background.development.js',
  '/home/kuro/projects/browser-extension/src/background/index.development.js',
  '/home/kuro/projects/browser-extension/src/background.js',
  '/home/kuro/projects/browser-extension/src/background/index.js',
  '/home/kuro/projects/browser-extension/src/popup.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.tsx',
  '/home/kuro/projects/browser-extension/src/popup.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.jsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options.development.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/options.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.tsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options.development.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/options.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.jsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.development.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel/index.tsx',
  '/home/kuro/projects/browser-extension/src/sidepanel.chrome.jsx',
  ... 35 more items
}
πŸ”΅ INFO   | Loaded environment variables from: [ '.env' ]
πŸ”΄ ERROR  | Failed to resolve '.plasmo/chrome-mv3.plasmo.manifest.json' 

2: NOTE: This issue has been fixed already at some point, so it can be safely disregarded

🟣 Plasmo v0.75.3
πŸ”΄ The Browser Extension Framework
🟠 WARN   | A new version of plasmo is available: v0.82.5
          | Run "pnpm i plasmo@0.82.5" to update
πŸ”΅ INFO   | Starting the extension development server...
🟑 1      | Creating Manifest Factory...
🟑 2      | Loaded env from .env
🟑 3      | Ensure exists: /home/kuro/projects/browser-extension/.plasmo
🟑 4      | Plasmo version file not found, busting cache...
🟑 5      | /home/kuro/projects/browser-extension/assets/icon512.png found, creating resized icons
🟑 6      | Loaded env from .env
🟑 7      | Creating static templates for popup
🟑 8      | Creating static templates for options
🟑 9      | Creating static templates for newtab
🟑 10     | Creating static templates for devtools
🟑 11     | Parsed config: { matches: [ 'https://www.example.com/*' ] }
🟑 12     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/example.tsx
🟑 13     | Creating content script mount for contents
🟑 14     | Parsed config: {
  matches: [
    'https://example.com/*',
  ]
}
🟑 15     | Adding content script:  /home/kuro/projects/browser-extension/src/contents/default.tsx
🟑 16     | Creating content script mount for contents
🟑 17     | { messageHandlerList: [], portHandlerList: [] }
🟑 18     | Creating BGSW entry
🟑 19     | Hash changed, updating manifest
🟑 20     | Watching the following files: Set(117) {
  '/home/kuro/projects/browser-extension/package.json',
  '/home/kuro/projects/browser-extension/src/.env.chrome.local',
  '/home/kuro/projects/browser-extension/src/.env.dev.local',
  '/home/kuro/projects/browser-extension/src/.env.development.local',
  '/home/kuro/projects/browser-extension/src/.env.local',
  '/home/kuro/projects/browser-extension/src/.env.chrome',
  '/home/kuro/projects/browser-extension/src/.env.dev',
  '/home/kuro/projects/browser-extension/src/.env.development',
  '/home/kuro/projects/browser-extension/src/.env',
  '/home/kuro/projects/browser-extension/src/content.chrome.ts',
  '/home/kuro/projects/browser-extension/src/content.development.ts',
  '/home/kuro/projects/browser-extension/src/content.ts',
  '/home/kuro/projects/browser-extension/src/content.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/content.development.tsx',
  '/home/kuro/projects/browser-extension/src/content.tsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/content.development.jsx',
  '/home/kuro/projects/browser-extension/src/content.jsx',
  '/home/kuro/projects/browser-extension/src/content.chrome.js',
  '/home/kuro/projects/browser-extension/src/content.development.js',
  '/home/kuro/projects/browser-extension/src/content.js',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.development.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.ts',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.tsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.development.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.jsx',
  '/home/kuro/projects/browser-extension/src/sandbox.chrome.js',
  '/home/kuro/projects/browser-extension/src/sandbox.development.js',
  '/home/kuro/projects/browser-extension/src/sandbox.js',
  '/home/kuro/projects/browser-extension/src/background.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.ts',
  '/home/kuro/projects/browser-extension/src/background.development.ts',
  '/home/kuro/projects/browser-extension/src/background/index.development.ts',
  '/home/kuro/projects/browser-extension/src/background.ts',
  '/home/kuro/projects/browser-extension/src/background/index.ts',
  '/home/kuro/projects/browser-extension/src/background.chrome.js',
  '/home/kuro/projects/browser-extension/src/background/index.chrome.js',
  '/home/kuro/projects/browser-extension/src/background.development.js',
  '/home/kuro/projects/browser-extension/src/background/index.development.js',
  '/home/kuro/projects/browser-extension/src/background.js',
  '/home/kuro/projects/browser-extension/src/background/index.js',
  '/home/kuro/projects/browser-extension/src/popup.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/popup.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/popup.tsx',
  '/home/kuro/projects/browser-extension/src/popup/index.tsx',
  '/home/kuro/projects/browser-extension/src/popup.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/popup.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/popup.jsx',
  '/home/kuro/projects/browser-extension/src/popup/index.jsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/options.development.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/options.tsx',
  '/home/kuro/projects/browser-extension/src/options/index.tsx',
  '/home/kuro/projects/browser-extension/src/options.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/options.development.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/options.jsx',
  '/home/kuro/projects/browser-extension/src/options/index.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.tsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.tsx',
  '/home/kuro/projects/browser-extension/src/devtools.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/devtools.jsx',
  '/home/kuro/projects/browser-extension/src/devtools/index.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.tsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.tsx',
  '/home/kuro/projects/browser-extension/src/newtab.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.chrome.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.development.jsx',
  '/home/kuro/projects/browser-extension/src/newtab.jsx',
  '/home/kuro/projects/browser-extension/src/newtab/index.jsx',
  '/home/kuro/projects/browser-extension/src/popup.chrome.html',
  '/home/kuro/projects/browser-extension/src/popup/index.chrome.html',
  '/home/kuro/projects/browser-extension/src/popup.development.html',
  '/home/kuro/projects/browser-extension/src/popup/index.development.html',
  '/home/kuro/projects/browser-extension/src/popup.html',
  '/home/kuro/projects/browser-extension/src/popup/index.html',
  '/home/kuro/projects/browser-extension/src/options.chrome.html',
  ... 17 more items
}
🟑 21     | Starting dev server on 33097, HMR on 1815...
πŸ”΅ INFO   | Loaded environment variables from: [ '.env' ]

node:internal/per_context/domexception:53
    ErrorCaptureStackTrace(this);
    ^
DOMException [DataCloneError]: function fn(...args) {
    return new Promise((resolve, reject) => {
      ArrayPrototypePush(args, (err, ...va...<omitted>... } could not be cloned.
    at new DOMException (node:internal/per_context/domexception:53:5)
    at Worker.postMessage (node:internal/worker:378:5)
    at ThreadsWorker.send (/home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/threads/ThreadsWorker.js:58:17)
    at Worker.send (/home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/Worker.js:124:17)
    at Worker.call (/home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/Worker.js:141:12)
    at /home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/Worker.js:113:12
    at new Promise (<anonymous>)
    at Worker.sendSharedReference (/home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/Worker.js:112:12)
    at /home/kuro/projects/browser-extension/node_modules/@plasmohq/parcel-core/node_modules/@parcel/workers/lib/Worker.js:103:20
    at Array.map (<anonymous>)

Node.js v20.5.1

Lastly, this is the package.json that was used during all of my testing (besides the plasmo version changes between them)

{
  "name": "examplet-extension",
  "displayName": "Example Extension",
  "version": "1.0.0",
  "description": "An example extension",
  "author": "Kurolox",
  "scripts": {
    "dev": "LIVE_ENV_SWAP=1 plasmo dev --verbose",
    "dev-ff": "plasmo dev --target=firefox-mv2",
    "build:dev": "LIVE_ENV_SWAP=1 plasmo build",
    "build:prod": "plasmo build --tag prod",
    "lint": "npx eslint 'src/**/*.{ts,tsx}' && tsc --noEmit",
    "lint:fix": "npx eslint 'src/**/*.{ts,tsx}' --fix",
    "format": "prettier --write '**/*.{ts,tsx,scss}'",
    "package": "./publish.sh",
    "cleanup": "rm -rf node_modules .plasmo build"
  },
  "dependencies": {
    "@plasmohq/storage": "^0.8.1",
    "@reduxjs/toolkit": "^1.8.3",
    "@sentry/react": "^7.12.1",
    "bemify-js": "^0.3.0",
    "lodash": "^4.17.21",
    "oidc-client-ts": "^2.2.5",
    "parse-domain": "^7.0.1",
    "react": "file:../react/node_modules/react",
    "react-bootstrap": "^2.4.0",
    "react-dom": "file:../react/node_modules/react-dom",
    "react-draggable": "^4.4.5",
    "react-oidc-context": "^2.3.0",
    "react-rating": "^2.0.5",
    "react-redux": "^8.0.2",
    "helper-library": "file:../react"
  },
  "devDependencies": {
    "@parcel/transformer-sass": "2.6.2",
    "@trivago/prettier-plugin-sort-imports": "^3.3.0",
    "@types/chrome": "0.0.188",
    "@types/node": "17.0.40",
    "@types/react": "18.0.12",
    "@types/react-dom": "18.0.5",
    "@types/redux-logger": "^3.0.9",
    "@typescript-eslint/eslint-plugin": "^5.37.0",
    "@typescript-eslint/parser": "^5.37.0",
    "eslint": "^8.23.1",
    "eslint-plugin-react": "^7.31.8",
    "husky": "4.3.8",
    "lint-staged": "^13.0.3",
    "plasmo": "^0.75.0",
    "prettier": "^2.7.1",
    "querystring-es3": "^0.2.1",
    "redux-logger": "^3.0.6",
    "sass": "^1.52.3",
    "typescript": "4.7.3"
  },
  "alias": {
    "@images": "./assets/images"
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "prettier --write",
      "eslint"
    ],
    "*.scss": [
      "prettier --write"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "manifest": {
    "host_permissions": [
      "*://fonts.googleapis.com/*"
    ],
    "permissions": [
      "storage",
      "tabs"
    ],
    "content_security_policy": {
      "extension_pages": "style-src 'self' fonts.cdnfonts.com fonts.googleapis.com;font-src 'self' fonts.gstatic.com fonts.cdnfonts.com;object-src 'self';default-src 'self' http://localhost:* ws://localhost:*;"
    }
  }
}
Kurolox commented 1 year ago

While I was experimenting with different version of plasmo I ended up fixing one of the errors, it was caused due to the alias section of the package.json. So right now, I've been able to get plasmo working in v0.82.5, with the caveat that I've been able to do this exclusively with npm

I believe that there's something wrong with my current setup that makes yarn and pnpm behave erratically when compared to npm, and I assume that a dependency being handled differently between all three package managers are displaying that behavior.

I wouldn't give too much thought at the other error because it seems like it was fixed at some point.

So, TL;DR: Ignore plasmo versions, it seems like npm is acting different than pnpm and yarn. I'd like to figure out what could be that difference so I can migrate to pnpm