I have searched overall, and for hours, but I couldn't find a solution. Can anyone please help me with that? Whenever I try to run a npm command, I get that error message:
npm ERR! must provide string spec
npm ERR! A complete log of this run can be found in:
npm ERR! /home/aboomar/.npm/_logs/2022-04-13T22_05_38_714Z-debug-0.log
I've tried to remove my npm & node and reinstall them, but nothing happens, I have tried upgrading & downgrading and nothing works. This shows up latterly everytime I try to use an npm command. I've tried to install npm manually & using sudo & using nvm but this didn't even helped. If that helps, I am using a fresh Ubuntu, that means that I've not installed any packages yet other than Npm.
Npm log file:
0 verbose cli [
0 verbose cli '/home/aboomar/.nvm/versions/node/v17.9.0/bin/node',
0 verbose cli '/home/aboomar/.nvm/versions/node/v17.9.0/bin/npm',
0 verbose cli 'install'
0 verbose cli ]
1 info using npm@8.5.5
2 info using node@v17.9.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/var/www/html/Artemis/.npmrc Completed in 0ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:/home/aboomar/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/home/aboomar/.nvm/versions/node/v17.9.0/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 10ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 4ms
23 verbose logfile /home/aboomar/.npm/_logs/2022-04-13T22_11_14_096Z-debug-0.log
24 timing npm:load:logFile Completed in 4ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 19ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree Completed in 12ms
30 timing command:install Completed in 91ms
31 verbose stack TypeError: must provide string spec
31 verbose stack at new Edge (/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:51:13)
31 verbose stack at Node.[_loadDepType] (/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:863:9)
31 verbose stack at Node.[Arborist.Node._loadDeps] (/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:840:23)
31 verbose stack at new Node (/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:252:20)
31 verbose stack at Arborist.[rootNodeFromPackage] (/home/aboomar/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:388:18)
32 verbose cwd /var/www/html/Artemis
33 verbose Linux 5.13.0-39-generic
34 verbose argv "/home/aboomar/.nvm/versions/node/v17.9.0/bin/node" "/home/aboomar/.nvm/versions/node/v17.9.0/bin/npm" "install"
35 verbose node v17.9.0
36 verbose npm v8.5.5
37 error must provide string spec
38 verbose exit 1
39 timing npm Completed in 256ms
40 verbose unfinished npm timer reify 1649887874259
41 verbose unfinished npm timer reify:loadTrees 1649887874335
42 verbose unfinished npm timer idealTree:init 1649887874336
43 verbose code 1
44 error A complete log of this run can be found in:
44 error /home/aboomar/.npm/_logs/2022-04-13T22_11_14_096Z-debug-0.log