I'm currently trying to configure my portfolio on a VPS using nginx and Putty. Now I want to install all required modules for my backend, but I get this errors. I have no idea what to do and would love to get some help.
npm ERR! Linux 4.15.0
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /root/portfolio/server/node_modules/.staging/@types/webidl-conversions-b037bbf1/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/root/portfolio/server/node_modules/.staging/@types/webidl-conversions-b037bbf1/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/portfolio/server/npm-debug.log
To install all the modules, I went to my backend folder and typed 'npm install' in my Putty console. Then it starts to download the modules and everything seems fine, until the errors pop up after a few seconds. I also tried 'apt-get update' and 'apt-get upgrade', but it changes nothing.
CodePudding user response:
I found the solution to my problem. I had to update my node and npm, but not like usually with 'apt update', 'apt upgrade', 'apt install nodejs' or 'apt install npm'. Instead I tried this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash nvm install 14.4.0
... and then it worked. Hope this will help someone