Operation rejected by operating system

I was running ‘npm install -g npm’ as instructed by the terminal, as I got this error.

npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Hi, you cannot install global packages on Glitch. Also, why do you want to install npm?

1 Like

Actually, you can. Just install it though the package.json file in the editor, it should say “add package”, search for the package you want to add, then click on it. Wait for it to install, and then you have access to the command. However, it’s not wise to install npm in the editor as it can mess up your project. Just change your node version to 14.x in the package.json and it should upgrade. Learn how to do that here