Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine which uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. As an asynchronous event driven framework, Node.js is designed to build scalable network applications.
Install with 1-click
1. Choose your 1-click install for your version of openSUSE or SLE from here and select open with “YaST 1-click install” and click OK.
2. Choose the Node.js repo and click Next.
3. Select nodejs and click Next.
4. Click Next on the installation summary and “Yes” on any warning messages.
5. Enter “root” password and click OK.
6. Click Trust if prompter for GNU key.
7. Click Finish on the installation successful screen.
That should install Node.js. You can confirm by running the Node.js binaries as follows:
suseleap421:~ # which node /usr/bin/node suseleap421:~ # node --version v4.2.2
suseleap421:~ # which npm /usr/bin/npm suseleap421:~ # npm --version 2.14.7
8. Finally, update npm binary to latest
suseleap421:~ # npm -g install npm@latest /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js npm@3.5.2 /usr/lib/node_modules/npm
Alternatively, you can install from terminal window as follows:
suseleap421:~ # zypper addrepo http://download.opensuse.org/repositories/devel:languages:nodejs/openSUSE_Leap_42.1/devel:languages:nodejs.repo Adding repository 'Node.js (openSUSE_Leap_42.1)' .................................[done] Repository 'Node.js (openSUSE_Leap_42.1)' successfully added Enabled : Yes Autorefresh : No GPG Check : Yes URI : http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_Leap_42.1/
suseleap421:~ # zypper refresh Retrieving repository 'Node.js (openSUSE_Leap_42.1)' metadata ....................[done] Building repository 'Node.js (openSUSE_Leap_42.1)' cache .........................[done] Repository 'Main Repository (NON-OSS)' is up to date. Repository 'Update Repository (Non-Oss)' is up to date. Repository 'Main Repository (OSS)' is up to date. Repository 'Main Update Repository' is up to date. Repository 'devel:languages:nodejs' is up to date. Repository 'node.js' is up to date. Repository 'openSUSE-42.1-0' is up to date. Repository 'openSUSE-Leap-42.1-Update' is up to date. All repositories have been refreshed.
suseleap421:~ # zypper install nodejs