You are not logged in.

#1 2014-08-30 21:01:54

joetemp
Member
Registered: 2013-12-16
Posts: 73

Can't upgrade because of Node.js conflicts?

Hey all,
I just started messing around with Node... so I'm not really sure what to do here. Tried to run a

pacman -Syu

today and got this:

error: failed to commit transaction (conflicting files)
nodejs: /usr/lib/node_modules/npm/node_modules/fstream-npm/LICENSE exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/github-url-from-git/LICENSE exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/minimatch/.travis.yml exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/bin/cmd.js exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/bin/usage.txt exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/.travis.yml exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/LICENSE exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/example/parse.js exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/index.js exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/package.json exists in filesystem
nodejs: /usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/readme.markdown exists in filesystem
Errors occurred, no packages were upgraded.

What should I do? Delete all those files?

Last edited by joetemp (2014-08-30 21:02:55)

Offline

#2 2014-08-30 22:02:51

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Can't upgrade because of Node.js conflicts?

First read:

https://wiki.archlinux.org/index.php/Pa … stem.22.21

Basically, find out what package ons those files and deal with the conflict.


Matt

"It is very difficult to educate the educated."

Offline

#3 2014-08-31 15:47:35

wwn
Member
Registered: 2013-03-25
Posts: 70

Re: Can't upgrade because of Node.js conflicts?

Better install npm manually, so it's complete independent of pacman:


download binarys: http://nodejs.org/download/

extract  e.g.:

~/bin #a bin in your personal home for example


create a link

ln -s node-v0.10.26-linux-x64 node


add dir bin to PATH

export PATH=$HOME/bin/node/bin:$PATH


set npm config parameter with: npm config set <key> <value>:

npm config set root /home/wwn/bin/node/lib/node_modules

npm config set binroot /home/wwn/bin/node/bin

npm config set manroot /home/wwn/bin/node/share/man


check

cat ~/.npmrc


look at your conf

npm config ls

~./npmrc example
root =    /home/wwn/bin/node/lib/node_modules
binroot = /home/wwn/bin/node/bin
manroot = /home/wwn/bin/node/share/man


check installation

node --version && npm -version && which npm # should lead to  /home/<user>/bin/

Last edited by wwn (2014-09-01 08:07:15)

Offline

#4 2014-12-08 08:34:40

cmeury
Member
Registered: 2013-10-24
Posts: 6

Re: Can't upgrade because of Node.js conflicts?

I had a similar issue, however with the "minimatch" npm module. It was also conflicting because of an upgrade of the "nodejs" package. I investigated a bit and saw that "nodejs" came actually came with "minimatch". I solved it by removing npm with npm (lolwhat) and then started the full upgrade again:

# npm --global remove npm
# pacmatic -Syu

The full upgrade re-installed npm. And everything was back afterwards.

I am neither a Pacman nor a nodejs expert, so this might be totally wrong.

Offline

Board footer

Powered by FluxBB