Open t1meshift opened 6 years ago
When I do sudo npm i -g mern-cli, it throws an error while installing next-tick dependency:
sudo npm i -g mern-cli
next-tick
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.
When I do
sudo npm i -g mern-cli
, it throws an error while installingnext-tick
dependency:Of course, installation from superuser shell works like a charm. But I don't think that NPM module installation should work in su only.