PlasmoHQ / plasmo

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

[BUG] plasmo dev -> Malloc ERROR on MacBook m3 #1060

Open quentin-aslan opened 1 week ago

quentin-aslan commented 1 week ago

What happened?

A bug happened!

I use a macbook air m3 (8gb) and when I init a project with pnpm create plasmo or plasmo init and I tried to start the project witn pnpm dev or plasmo dev. I have there error : Check -> 'Relevant log output' below

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

No response

Relevant log output

🟣 Plasmo v0.89.1
🔴 The Browser Extension Framework
🔵 INFO   | Starting the extension development server...
🔵 INFO   | Building for target: chrome-mv3
🔵 INFO   | Loaded environment variables from: []
(node:980) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
node(980,0x173497000) malloc: Incorrect checksum for freed object 0x156342c00: probably modified after being freed.
Corrupt value: 0x0
node(980,0x172c7f000) malloc: Incorrect checksum for freed object 0x127bcd800: probably modified after being freed.
Corrupt value: 0x80b00000000
node(980,0x173497000) malloc: *** set a breakpoint in malloc_error_break to debug
node(980,0x172c7f000) malloc: *** set a breakpoint in malloc_error_break to debug
 ELIFECYCLE  Command failed.
zsh: abort      pnpm dev

(OPTIONAL) Contribution

Code of Conduct

Riobigdan commented 1 week ago

尝试使用 --max-old-space-size 参数增加 Node.js 的内存限制: NODE_OPTIONS=--max-old-space-size=4096 pnpm dev

Riobigdan commented 1 week ago

尝试使用 --max-old-space-size 参数增加 Node.js 的内存限制: NODE_OPTIONS=--max-old-space-size=4096 pnpm dev

并非解决问题 只是临时处理

quentin-aslan commented 1 week ago

Hi, it doesnt fix my issue, but I found a fix : use node v20 instead of node v22.

I use nvm to manage the node version :

  1. https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
  2. Open your terminal and type : 2.1. nvm install 20 2.2. nvm use 20
  3. Start the app
HowieG commented 1 week ago

Having this issue as well

HowieG commented 1 week ago

Hi, it doesnt fix my issue, but I found a fix : use node v20 instead of node v22.

I use nvm to manage the node version :

  1. https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
  2. Open your terminal and type : 2.1. nvm install 20 2.2. nvm use 20
  3. Start the app

This worked for me thanks