Hashnode / Hashnode/mern-cli

Can't install mern-cli using sudo

Aperta
#34 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
566
Fork
145
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When I do `sudo npm i -g mern-cli`, it throws an error while installing `next-tick` dependency:
```0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'i', '-g', 'mern-cli' ]
2 info using npm@6.4.0
3 info using node@v10.9.0
...
153 silly pacote version manifest for result-core@1.2.1 fetched in 391ms
154 silly resolveWithNewModule result-core@1.2.1 checking installable status
155 silly fetchPackageMetaData error for next-tick@github:timoxley/next-tick#0.0.2 Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
155 silly fetchPackageMetaData fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
156 timing stage:rollbackFailedOptional Completed in 1ms
157 timing stage:runTopLevelLifecycles Completed in 13448ms
158 verbose stack Error: Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
158 verbose stack fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
158 verbose stack
158 verbose stack at ChildProcess.exithandler (child_process.js:289:12)
158 verbose stack at ChildProcess.emit (events.js:182:13)
158 verbose stack at maybeClose (internal/child_process.js:961:16)
158 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
159 verbose cwd /home/sh1ft
160 verbose Linux 4.16.18-1-MANJARO
161 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "mern-cli"
162 verbose node v10.9.0
163 verbose npm v6.4.0
164 error code 128
165 error Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
165 error fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
166 verbose exit [ 1, true ]
```

Of course, installation from superuser shell works like a charm. But I don't think that NPM module installation should work in su only.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia riproducendo `sudo npm i -g mern-cli` con le versioni di Node.js e npm mostrate, quindi esamina il fallimento del clone Git di `next-tick` segnalato in `/root/.npm/_cacache/tmp`. L'attività è completata quando la CLI si installa correttamente senza richiedere una shell da superuser.

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

Valutazione

Stack tecnologico
git, javascript, nodejs
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.