Question

cannot upgrade Nodejs to new version

Posted July 27, 2016 5.5k views
Node.js

i am getting errors while updating nodejs on centos

file /usr/lib/nodemodules/npm/nodemodules/npmlog/nodemodules/are-we-there-y et/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesour ce.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/npmlog/nodemodules/gauge/README.m d conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos. x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/npmlog/nodemodules/gauge/package. json conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.cent os.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/npmlog/nodemodules/gauge/progress -bar.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.c entos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/npmlog/package.json conflicts betw een attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodej s-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/read-package-json/nodemodules/glo b/README.md conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.e l7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/common.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.e l7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/read-package-json/nodemodules/glo b/glob.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7 .centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/LICENSE conflicts between attempted installs of nodejs- 1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos. x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/README.md conflicts between attempted installs of nodej s-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.cento s.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/minimatch.js conflicts between attempted installs of no dejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.ce ntos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/nodemodules/brace-expansion/nodemodules/balanced-matc h/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesourc e.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/nodemodules/brace-expansion/nodemodules/concat-map/pa ckage.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el 7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/nodemodules/brace-expansion/package.json conflicts bet ween attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and node js-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/minimatch/package.json conflicts between attempted installs of no dejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.ce ntos.x8664
file /usr/lib/nodemodules/npm/nodemodules/read-package-json/nodemodules/glo b/nodemodules/path-is-absolute/package.json conflicts between attempted install s of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource .el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/read-package-json/nodemodules/glo b/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesourc e.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/read-package-json/nodemodules/glo b/sync.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7 .centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/retry/Makefile conflicts between a ttempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6 .3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/retry/lib/retry.js conflicts betwe en attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs -1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/nodemodules/npm/nodemodules/retry/lib/retryoperation.js confl icts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs-1:6.3.1-1nodesource.el7.centos.x8664
file /usr/lib/node
modules/npm/nodemodules/retry/package.json conflicts betwe en attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x8664 and nodejs -1:6.3.1-1nodesource.el7.centos.x86_64

Error Summary

any idea? how can i upgrade to new nodejs

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

3 answers

It looks like you have packages that are conflicting with new version of nodejs.

Try running the command below to remove all nodejs packages:
yum remove node*

And then install nodejs again.
sudo yum install nodejs npm

Try the following commands -
The module n makes version-management easy:
Linux/Mac

sudo npm install n -g
sudo n 0.12.2

For the latest stable version:

sudo n stable

Windows:

just reinstall node from the .msi in Windows from the node website.

Submit an Answer