PlasmoHQ / plasmo

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

[BUG] Cannot read properties of undefined (reading 'indexOf') #795

Open nikolalukovic opened 8 months ago

nikolalukovic commented 8 months ago

What happened?

Trying to start dev after creating an empty project throws an error.

Version

Latest

What OS are you seeing the problem on?

MacOSX

Node version

v21.0.0

What browsers are you seeing the problem on?

No response

Relevant log output

> primal-web-extension@0.0.1 dev /Users/nikola/Projects/primal-web-extension
> plasmo dev --verbose

🟡 0      | Running command: dev
🟡 1      | TypeError: Cannot read properties of undefined (reading 'indexOf')
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:82:1662
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:3:461
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:82:3161
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:3:461
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:158:499
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:3:461
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:158:7994
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:3:461
    at file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:158:11611
    at async qg (file:///Users/nikola/Projects/primal-web-extension/node_modules/.pnpm/plasmo@0.83.0_react-dom@18.2.0_react@18.2.0/node_modules/plasmo/dist/index.js:158:12621)
🔴 EXIT   | This program will terminate in 3 seconds...
🔴 EXIT   | This program will terminate in 2 seconds...
🔴 EXIT   | This program will terminate in 1 seconds...
 ELIFECYCLE  Command failed with exit code 1.

(OPTIONAL) Contribution

Code of Conduct

nikolalukovic commented 8 months ago

The issue is with the Node version. It doesn't work with the latest v21.0.0 but it works with the previous version v20.8.1.