1

Whenever I try to install uglify-js with npm on my Raspberry Pi, I get an error. I am trying to install jade, and uglify is a dependency. Express install fails as well.

To me, it looks like either npm or node.js is outdated.

npm version = 1.1.4, node.js version = 0.6.19, I am using the npmjs.eu registry mirror for npm.

To install nodejs and npm, I did sudo apt-get install nodejs npm. I have updated everything I could. What is the problem?

pi@raspberrypi ~ $ npm update -g npm
pi@raspberrypi ~ $ npm install uglify-js
npm http GET http://registry.npmjs.eu/uglify-js
npm http 304 http://registry.npmjs.eu/uglify-js
npm http GET http://registry.npmjs.eu/uglify-to-browserify
npm http GET http://registry.npmjs.eu/async
npm http GET http://registry.npmjs.eu/source-map
npm http GET http://registry.npmjs.eu/optimist
npm http 304 http://registry.npmjs.eu/uglify-to-browserify
npm http 304 http://registry.npmjs.eu/async
npm http 304 http://registry.npmjs.eu/optimist
npm http 304 http://registry.npmjs.eu/source-map
npm ERR! error installing [email protected]

npm ERR! Error: No compatible version found: source-map@'>=0.1.7- <0.2.0-'
npm ERR! Valid install targets:
npm ERR! ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR!     at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR!     at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR!     at /usr/share/npm/lib/cache.js:408:5
npm ERR!     at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR!     at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/pi/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.10.25+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "uglify-js"
npm ERR! cwd /home/pi
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: source-map@'>=0.1.7- <0.2.0-'
npm ERR! message Valid install targets:
npm ERR! message ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm not ok

1 Answer 1

1

Upgrade your installation of node. node v0.6.x is quite old and v0.10.26 is the current stable version (as of this writing).

If you're on Debian, v0.10.26 is available from the wheezy-backports, jessie, and sid repos.

If you're on Ubuntu, you can use this repo to easily stay up to date.

I'm not sure about packages for other platforms, but if nothing else there are always pre-compiled binary tarballs and source code (which is an easy ./configure && make && sudo make install) available on nodejs.org.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.