Score:0

how to resolve the error installing and uninstalling mysqljs/mysql caused

in flag

immediately I installed mysqljs/mysql my IP address started throwing the error:

502 Bad Gateway
nginx/1.18.0 (Ubuntu)

and even after I uninstalled it my IP is still having the same error. I then tried to re-install it as root, then it threw the error:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone ssh://[email protected]/mysqljs/mysql.git /root/.npm/_cacache/tmp/git-cloneeZRB9b --recurse-submodules --depth=1
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-cloneeZRB9b': Permission denied

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-05T16_04_36_149Z-debug.log

Please what should I do?

This is the error log:

0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'mysqljs/mysql' ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/var/www/app/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/root/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing config:load:flatten Completed in 3ms
23 timing npm:load:cleanupLog Completed in 2ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 19ms
27 timing arborist:ctor Completed in 1ms
28 timing idealTree:init Completed in 223ms
29 timing arborist:ctor Completed in 0ms
30 timing idealTree Completed in 1946ms
31 timing command:install Completed in 1985ms
32 verbose stack Error: An unknown git error occurred
32 verbose stack     at makeError (/usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/make-error.js:28:13)
32 verbose stack     at /usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/spawn.js:36:26
32 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:95:5)
32 verbose stack     at async Object.withTempDir (/usr/lib/node_modules/npm/node_modules/@npmcli/fs/lib/with-temp-dir.js:23:14)
32 verbose stack     at async Arborist.[retrieveSpecName] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:512:18)
32 verbose stack     at async /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:483:20
32 verbose stack     at async Promise.all (index 0)
32 verbose stack     at async Arborist.[applyUserRequestsToNode] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:451:7)
32 verbose stack     at async Arborist.[applyUserRequests] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:394:7)
32 verbose stack     at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:209:7)
33 verbose cwd /var/www/app
34 verbose Linux 5.4.0-73-generic
35 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "mysqljs/mysql"
36 verbose node v14.17.5
37 verbose npm  v7.22.0
38 error code 128
39 error An unknown git error occurred
40 error command git --no-replace-objects clone ssh://[email protected]/mysqljs/mysql.git /root/.npm/_cacache/tmp/git-cloneeZRB9b --recurse-submodules --depth=1
41 error fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-cloneeZRB9b': Permission denied
42 verbose exit 128
in flag
One of the first problems that jumps out is that you're running web server stuff as `root`. Everything else would be just a guess because I don't know if your web server is running Ubuntu 6.06 (Dapper) or something a little more recent. You may want to start by reading the log that is specified, as that will have far more actionable information than has been provided in this question
Abayomi Usman avatar
in flag
Please check my edit I just added the error log, i hope this would be of great help
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.