Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Node and NPM. Need to confirm Bash on Ubuntu on Windows #3111

Closed
carpben opened this issue Apr 19, 2018 · 9 comments
Closed

Installing Node and NPM. Need to confirm Bash on Ubuntu on Windows #3111

carpben opened this issue Apr 19, 2018 · 9 comments

Comments

@carpben
Copy link

carpben commented Apr 19, 2018

I need to install Node and NPM, and on the download page for unix I need to choose between 5 different options: 32bits, 64 bits, ArmV6, ArmV7, Armv8. I couldn't find Bash/Ubuntu in any directory, and not in the 64 bit program directory. If my Windows is 64 bit, can I assume that Bash/Ubuntu will be 64 bits as well, and that that is the right file to download?

Arms themselves are either 32 or 64 bit so this left me a confused. Are Arm versions meant for mobile devices?

@heldchen
Copy link

please follow the issue reporting template as specified by the WSL team.

nodejs provides packages for ubuntu that you can easily install either via their setup script (https://github.com/nodesource/distributions#debinstall) or manually (https://github.com/nodesource/distributions#debmanual).

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

@carpben
Copy link
Author

carpben commented Apr 19, 2018

Thank you @heldchen. The packages you mentioned are provided by nodesource, not by the nodejs.org. As for the reporting template, It was build for reporting a bug, so I thought it is not completely relevant.

@therealkenc
Copy link
Collaborator

therealkenc commented May 25, 2018

@heldchen's reply is correct. His answer is nodejs.org's official direction (if there is such a thing).

@logicware
Copy link

I installed node 10.12.0, but on npm -v I am getting

net.js:215
    this._handle.open(fd);
                 ^

Error: EINVAL: invalid argument, uv_pipe_open
    at new Socket (net.js:215:18)
    at createWritableStdioStream (internal/process/stdio.js:164:16)
    at process.getStdout [as stdout] (internal/process/stdio.js:14:14)
    at console.js:249:38
    at NativeModule.compile (bootstrap_node.js:613:7)
    at Function.NativeModule.require (bootstrap_node.js:558:18)
    at setupGlobalConsole (bootstrap_node.js:327:41)
    at startup (bootstrap_node.js:80:7)
    at bootstrap_node.js:625:3

@nicowernli
Copy link

nicowernli commented Nov 2, 2018

Same error as @logicware here when trying to execute npm

@logicware
Copy link

@nicowernli
You have to install npm separately. It does not get installed with nodejs.

@luchillo17
Copy link

Use NVM, easiest setup for both npm & node out there.

@danielbonifacio
Copy link

In my case, I needed to separately install npm with

sudo apt install npm

restart my shell and update npm with

sudo npm i -g npm@latest

then restart my shell again to get it updated

@RohitRathore1
Copy link

please follow the issue reporting template as specified by the WSL team.

nodejs provides packages for ubuntu that you can easily install either via their setup script (https://github.com/nodesource/distributions#debinstall) or manually (https://github.com/nodesource/distributions#debmanual).

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

but npm is not working. I am getting this:

npm --version : not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: : not foundram Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: /mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants