Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support alternative npm registries

Aperta
#1,817 8 commenti 7 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
nodejs
Ambito
tooling

Direzione di ricerca

Reproduce the issue with npx "@observablehq/framework@latest" create, cd hello-framework, and npm run dev, then inspect node_modules/@observablehq/framework/dist/npm.js around lines 200-207 and the referenced .npmrc settings. Done means framework package fetching works with an internal registry and the reported certificate setup without editing the installed file.

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

Descrizione

enhancement

I am unable to setup observable framework at my workplace:

  • windows 10
  • node v20.18.0

To reroute npm installs to our internal registry, registry and other setting are placed in a .npmrc file in the home directory

  1. npx "@observablehq/framework@latest" create
  2. cd hello-framework
  3. npm run dev
    --> leads to an error:
GET /
npm:@observablehq/plot@latest → TypeError: fetch failed
    at node:internal/deps/undici/undici:13185:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async <myPath>/node_modules/@observablehq/framework/dist/npm.js:207:22{
  [cause]: Error: getaddrinfo ENOTFOUND [registry.npmjs.org](http://registry.npmjs.org/)

The only way I was able to fix it was to change line 200 in ./node_modules/@observablehq/framework/dist/npm.js
const href =https://registry.npmjs.org/${name}${disttag ? /${disttag} : ""};
with the URL of our registry.

Question 1: That doesn't seem to right way to set up observable, changing this file ?!

  1. As a result npm run dev (after modifying npm.js) leads to:
GET /
npm:@observablehq/plot@latest → TypeError: fetch failed
   at node:internal/deps/undici/undici:13185:13
   at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
   at async <mypath>/node_modules/@observablehq/framework/dist/npm.js:201:22 {
 [cause]: Error: self-signed certificate in certificate chain
     at TLSSocket.onConnectSecure (node:_tls_wrap:1677:34)
     at TLSSocket.emit (node:events:519:28)
     at TLSSocket._finishInit (node:_tls_wrap:1076:8)
     at ssl.onhandshakedone (node:_tls_wrap:862:12) {
   code: 'SELF_SIGNED_CERT_IN_CHAIN'
  }
}

Question 2: how can I fix this to proceed setting up framework?

I found

Lingua principale
TypeScript
Stelle
3.7k
Fork
209
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 observablehq/framework

Tutte le issue di observablehq/framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.