The dependencies seem to be broken in my pretty vanilla Tumbleweed installation.
a) Am I doing some stupid newbie mistake? Otherwise the dependency detection finding a conflict seems to indicate a breakdown of the most basic step of automated QA, which I somehow have a problem of believing in. My experience with Tumbleweed has been superb by now :good:
b) Is using npm from the repo not the usual way? Are the nodejs/npm packages maintained, or am I trying to ride a dead horse ?
More information about my setup below.
**traveller:~ #** zypper in npm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides npm(readable-stream) < 1.1 needed by npm-2.1.3-1.2.noarch
Solution 1: do not install npm-2.1.3-1.2.noarch
Solution 2: break npm-2.1.3-1.2.noarch by ignoring some of its dependencies
**Choose from above solutions by number or cancel [1/2/c] (c): c**
**traveller:~ #** uname -a
Linux traveller.site 4.1.1-1-desktop #1 SMP PREEMPT Wed Jul 8 14:23:40 UTC 2015 (cac28b3) x86_64 x86_64 x86_64 GNU/Linux
**traveller:~ #** zypper lr
# | Alias | Name | Enabled | GPG Check | Refresh
--+----------------------------------+---------------------------------+---------+-----------+--------
1 | download.opensuse.org-non-oss | Haupt-Repository (NON-OSS) | Yes | (r ) Yes | Yes
2 | download.opensuse.org-oss | Haupt-Repository (OSS) | Yes | (r ) Yes | Yes
3 | download.opensuse.org-tumbleweed | Hauptaktualisierungs-Repository | Yes | (r ) Yes | Yes
4 | http-ftp.gwdg.de-4307efbc | Packman Repository | Yes | (r ) Yes | Yes
5 | http-opensuse-guide.org-8f7b1893 | libdvdcss repository | No | ---- | No
6 | openSUSE-20150612-0 | openSUSE-20150612-0 | No | ---- | No
7 | repo-debug | openSUSE-Tumbleweed-Debug | No | ---- | No
8 | repo-source | openSUSE-Tumbleweed-Source | No | ---- | No
**traveller:~ #**
thanks for the answer, but npm is not included in the nodejs package in Tumbleweed , it has its own package which is also not listed as one of the requirements of nodejs, so it does not automatically get pulled in.
Something seems to be fishy with the dependencies. Either zypper or rpm or me is very confused :sarcastic:
# zypper info --require npm
Informationen für Paket npm:
----------------------------
Repository: Haupt-Repository (OSS)
Name: npm
Version: 2.1.3-1.2
Arch: noarch
Anbieter: openSUSE
Installiert: Nein
Status: nicht installiert
Installierte Größe: 1,6 MiB
Zusammenfassung: Node.js Package Manager
Beschreibung:
npm is a package manager for node.js. You can use it to install and publish your
node programs. It manages dependencies and does other cool stuff.
Benötigt:
/bin/sh
/bin/bash
/usr/bin/env
nodejs(engine)
/usr/bin/node
...
**npm(readable-stream) >= 1.0.32**
...
which should be provided by nodejs-readable-stream
**traveller:~ #** zypper info --provide nodejs-readable-stream
Loading repository data...
Reading installed packages...
Information for package nodejs-readable-stream:
-----------------------------------------------
Repository: Haupt-Repository (OSS)
Name: nodejs-readable-stream
Version: 1.1.13-1.1
Arch: noarch
Vendor: openSUSE
Installed: No
Status: not installed
Installed Size: 53.3 KiB
Summary: Streams2, a user-land copy of the stream library from Node.js v0.10.x
Description:
Node-core streams for userland. This package is a mirror of the Streams2 and
Streams3 implementations in Node-core. If you want to guarantee a stable
streams base, regardless of what version of Node you, or the users of your
libraries are using, use readable-stream only and avoid the "stream" module in
Node-core.
Provides:
nodejs-readable-stream == 1.1.13-1.1
** npm(readable-stream) == 1.1.13**
Yet the error message read:
Problem: nothing provides **npm(readable-stream) < 1.1** needed by npm-2.1.3-1.2.noarch
The resolvable problem is as described… This version of npm requires <less than>, not “equal or less than” so the condition is not met.
I spent some time looking at this, and the problem doesn’t appear resolvable. If you ignore dependencies, you will be taken down a long road of similar dependencies which can’t be met until a package or file just doesn’t exist.
So, npm and nodejs from the TW repo appears to be thoroughly broken. Although I didn’t try, I assume that installing nodejs from the 13.2 repo would work just fine (and includes npm). You should be able to install from http://software.opensuse.org if you don’t want to configure 13.2 repos.
I went ahead and did a test installing 13.2 nodejs and npm and initial results are promising. I didn’t check whether node and npm run without problems, but at least npm runs without throwing an error.
Curiously, the “one-click install” for 13.2 at http://software.opensuse.org fails because of some kind of repo info problem although there is nothing wrong with the repo. But, you can install successfully as follows using zypper.
First, remove all existing nodejs and npm currently in your system
zypper rm nodejs npm
Add the 13.2 nodejs repo and refresh
zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.2/ 13.2_nodejs && zypper ref
Install nodejs which will also pull in “bundled npm”
Have updated a recently started wiki page I run about installing nodejs. I hope to keep these pages current. Anyone and everyone is invited to make changes. Eventually, if there is a desire they may provide a basis for SDB which do not currently exist. https://en.opensuse.org/User:Tsu2/nodejs
In fact, for anyone running various Development languages, these pages may be extremely helpful to install and run what is required.
Pages created to date include
nodejs / npm
ruby /ruby on rails / gem