logseq / logseq/logseq-plugin-samples

Node 22 broken for ARM macOS

Aperta
#39 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
CSS
Stelle
383
Fork
97
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I've been testing a variety of sample plugins, and they all seem broken during build. i came across a reference to the error that was happening during the build, and it suggested that the issue has something to do with an incompabitiblity between node 22 and something in `@libseq/libs` that is not in node 20. I used nvm to switch to node 20, and each sample repo built successfully.

**Node 22:**
```
ogseq-plugin-samples/logseq-a-translator on  master [!?] is 📦 v0.0.1 via  v22.9.0 via 💎 v3.0.5 took 3s
❯ npm run build

> logseq-a-translator@0.0.1 build
> parcel build --public-url . --no-source-maps index.html

(node:95127) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⠙ Building index.html...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#brows
⠸ Building index.ts...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#brows
⠼ Building index.ts...
node(95127,0x16fd9b000) malloc: Incorrect checksum for freed object 0x11d8c0e00: probably modified after being freed.
Corrupt value: 0x10220a4930383839
node(95127,0x178407000) malloc: Incorrect checksum for freed object 0x10a847600: probably modified after being freed.
Corrupt value: 0x10220a4930383839
node(95127,0x178407000) malloc: *** set a breakpoint in malloc_error_break to debug
node(95127,0x16fd9b000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort npm run build
```

**Node 20:**
```
logseq-plugin-samples/logseq-a-translator on  master [!?] is 📦 v0.0.1 via  v20.18.0 via 💎 v3.0.5 took 3s
❯ npm run build

> logseq-a-translator@0.0.1 build
> parcel build --public-url . --no-source-maps index.html

⠙ Building index.html...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#brows
⠹ Building index.html...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#brows
⠼ Building lsplugin.user.js...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#brows
✨ Built in 1.09s

dist/index.html 383 B 471ms
dist/index.9947b3c0.js 90.11 KB 213ms

```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo `npm run build` in un plugin di esempio con Node 22 e Node 20, concentrandoti sulla build di `index.ts` e sull’incompatibilità segnalata di `@libseq/libs`. Confronta le dipendenze e la configurazione di build utilizzate dai repository di esempio; il lavoro è completo quando gli esempi vengono compilati correttamente su ARM macOS con Node 22.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
nodejs
Ambito
build-system
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.