{"id":122,"hash":"3c62f5bb4baa6680e1bd209506803a75e99ae8f43a246f8192266ef7b2113b01","pattern":"npm install error `not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm:`","full_message":"I have installed Ubuntu Bash on Windows. I already have nodejs and npm on my windows machine at C:\\Program Files\\nodejs. In the bash shell in Windows, I am running a script which uses npm install command. The script is giving following error\n\n: not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm:\n: not foundram Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm:\n/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting \"in\")","ecosystem":"npm","package_name":"npm-install","package_version":null,"solution":"Note: Before following the steps below, first try to restart your shell.\n\nYou can install Node.js and NPM with your Windows PowerShell as well, so if you've done that it won't work properly for your Subsystem. That means you have to install it twice (Powershell and Subsystem) or decide on one thing.\n\nIf the preceding text, has not helped you, this is how to solve the problem:\n\nRemove your current installations\n\nsudo apt-get --purge remove node\n(\"sudo apt autoremove node\" if console is asking for it)\nsudo apt-get --purge remove nodejs\n\nInstall node the right way.\nThis is for version 14 (view current LTS version):\n\ncurl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\nThen install build tools so you can install add-ons for npm later\n\nsudo apt-get install -y build-essential\n\nNow you can type in\n\nnpm -v\nnode -v\nSame thing: nodejs -v\n\nto check whether Node.js and NPM are installed correctly. If it shows nothing, restart the shell.\nIf it still shows the same error, restart the WSL/ PC or try with sudo npm -v\n\nHere are two links that may also help you.\n\nhttps://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions\nhttps://github.com/nodesource/distributions/blob/master/README.md#debinstall\n\nAlso, take a look at the Node Version Manager (NVM). With it, you can easily switch back and forth between versions.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/45853530/npm-install-error-not-foundram-files-nodejs-npm-3-mnt-c-program-files-nodejs","votes":100,"created_at":"2026-04-19T04:41:21.901355+00:00","updated_at":"2026-04-19T04:51:03.650041+00:00"}