Npm can't find file while trying to update

I was trying to run electron forge, that required a newer version of npm, upon trying to run it I got

WARN engine npm@7.15.0: wanted: {“node”:">=10"} (current: {“node”:“8.10.0”,“npm”:“3.5.2”})
/usr/local/lib
└── (empty)

npm ERR! Linux 5.4.0-73-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “npm@latest” “-g”
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename ‘/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552’ → ‘/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect’
npm ERR! enoent ENOENT: no such file or directory, rename ‘/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552’ → ‘/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /home/gaelan/npm-debug.log
npm ERR! code 1

1 Like