Cannot install on macbook.

Aperta
#9,079 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, macos, nodejs

Direzione di ricerca

Inizia riproducendo npm i pouchdb nell’ambiente segnalato macOS Darwin 24.3.0, arm64 e Node.js 20.16.0 e analizza il fallimento della build node-gyp di leveldown. Concentrati sull’header C++ string mancante mostrato nel log. Il lavoro è concluso quando PouchDB viene installato correttamente in questo ambiente senza l’errore di build segnalato.

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

Descrizione

I cannot run npm i pouchdb

npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by browser-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by level-transcoder (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by abstract-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by classic-level (https://github.com/Level/community#faq)
npm warn deprecated [email protected]: Superseded by classic-level (https://github.com/Level/community#faq)
npm error code 1
npm error path /Users/steve/sites/tg-trading-bot-master/node_modules/level/node_modules/leveldown
npm error command failed
npm error command sh -c node-gyp-build
npm error CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.13.2 found at "/opt/homebrew/opt/[email protected]/bin/python3.13"
npm error gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.13
npm error gyp info spawn args [
npm error gyp info spawn args '/Users/steve/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/steve/sites/tg-trading-bot-master/node_modules/level/node_modules/leveldown/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/steve/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/steve/Library/Caches/node-gyp/20.16.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/steve/Library/Caches/node-gyp/20.16.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/Users/steve/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/steve/Library/Caches/node-gyp/20.16.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/Users/steve/sites/tg-trading-bot-master/node_modules/level/node_modules/leveldown',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5:
npm error In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8:
npm error ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:10: fatal error: 'string' file not found
npm error    16 | #include <string>
npm error       |          ^~~~~~~~
npm error 1 error generated.
npm error make: *** [Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1
npm error gyp ERR! build error 
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/steve/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Darwin 24.3.0
npm error gyp ERR! command "/Users/steve/.nvm/versions/node/v20.16.0/bin/node" "/Users/steve/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /Users/steve/sites/tg-trading-bot-master/node_modules/level/node_modules/leveldown
npm error gyp ERR! node -v v20.16.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/steve/.npm/_logs/2025-04-14T13_30_40_360Z-debug-0.log
steve@Stephens-MacBook-Pro tg-trading-bot-master % 
Lingua principale
JavaScript
Stelle
17.6k
Fork
1.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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.

Altre issue di apache/pouchdb

Tutte le issue di apache/pouchdb

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.