Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

npm install issue with jshint #2838

Closed
lad opened this Issue · 2 comments

2 participants

@lad

Failed to install jshint with npm.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:   oneiric

# uname -a
Linux louis-ws 3.0.0-26-generic #42-Ubuntu SMP Wed Sep 5 08:37:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I had node.js and npm previously installed and then ran:

# npm install jshint

npm ERR! TypeError: Cannot read property 'node' of undefined
npm ERR!     at /usr/share/npm/lib/install.js:200:35
npm ERR!     at c (/usr/share/npm/lib/cache.js:110:12)
npm ERR!     at /usr/share/npm/lib/cache.js:227:23
npm ERR!     at cb (/usr/share/npm/lib/utils/graceful-fs.js:32:9)
npm ERR! Report this *entire* log at <http://github.com/isaacs/npm/issues>
npm ERR! or email it to <npm-@googlegroups.com>
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm not ok

Then I uninstalled node.js and npm:

# apt-get purge npm
# apt-get purge nodejs

Then installed each again:

# sudo apt-get install nodejs
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libev4 libv8-3.1.8.22
The following NEW packages will be installed:
libev4 libv8-3.1.8.22 nodejs
0 upgraded, 3 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/1,943 kB of archives.
After this operation, 6,570 kB of additional disk space will be used.
Do you want to continue [Y/n]? Selecting previously deselected package libv8-3.1.8.22.

(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%

(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 406151 files and directories currently installed.)
Unpacking libv8-3.1.8.22 (from .../libv8-3.1.8.22_3.1.8.22-1ubuntu2_amd64.deb) ...
Selecting previously deselected package libev4.
Unpacking libev4 (from .../libev4_1%3a4.04-1_amd64.deb) ...
Selecting previously deselected package nodejs.
Unpacking nodejs (from .../nodejs_0.4.9-1ubuntu3_amd64.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up libv8-3.1.8.22 (3.1.8.22-1ubuntu2) ...
Setting up libev4 (1:4.04-1) ...
Setting up nodejs (0.4.9-1ubuntu3) ...
update-alternatives: using /usr/bin/node to provide /usr/bin/js (js) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place


# sudo apt-get install npm
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-ares-dev libev-dev libv8-dev nodejs-dev
The following NEW packages will be installed:

libc-ares-dev libev-dev libv8-dev nodejs-dev npm
0 upgraded, 5 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/528 kB of archives.
After this operation, 2,474 kB of additional disk space will be used.
Do you want to continue [Y/n]? Selecting previously deselected package libc-ares-dev.

(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%

(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 406212 files and directories currently installed.)

Unpacking libc-ares-dev (from .../libc-ares-dev_1.7.4-1_amd64.deb) ...
Selecting previously deselected package libev-dev.
Unpacking libev-dev (from .../libev-dev_1%3a4.04-1_amd64.deb) ...
Unpacking libev-dev (from .../libev-dev_1%3a4.04-1_amd64.deb) ...
Selecting previously deselected package libv8-dev.
Unpacking libv8-dev (from .../libv8-dev_3.1.8.22-1ubuntu2_amd64.deb) ...
Selecting previously deselected package nodejs-dev.
Unpacking nodejs-dev (from .../nodejs-dev_0.4.9-1ubuntu3_amd64.deb) ...
Selecting previously deselected package npm.
Unpacking npm (from .../archives/npm_0.2.19-1_all.deb) ...
Processing triggers for man-db ...
Setting up libc-ares-dev (1.7.4-1) ...

Selecting previously deselected package nodejs-dev.
Unpacking nodejs-dev (from .../nodejs-dev_0.4.9-1ubuntu3_amd64.deb) ...
Selecting previously deselected package npm.
Unpacking npm (from .../archives/npm_0.2.19-1_all.deb) ...
Processing triggers for man-db ...
Setting up libc-ares-dev (1.7.4-1) ...
Setting up libev-dev (1:4.04-1) ...
Setting up libv8-dev (3.1.8.22-1ubuntu2) ...
Setting up nodejs-dev (0.4.9-1ubuntu3) ...
Setting up npm (0.2.19-1) ...

npm install -j jshint
npm ERR! couldn't read package.json in .
npm ERR! Error installing .
npm ERR! Error: ENOENT, No such file or directory 'package.json'
npm ERR! Report this *entire* log at <http://github.com/isaacs/npm/issues>
npm ERR! or email it to <npm-@googlegroups.com>
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm not ok

Let me know if I can provide any further information.

@mfncooper
Collaborator

If the version numbers for Node.js and npm in that log are accurate, they are extremely old, especially npm. That's Node.js v0.4.9 and npm v0.2.19. Current versions are Node.js v0.8.11 and npm v1.1.62. I don't know why the mechanism you're using is giving you such old versions, but you need to upgrade before you do anything else.

@lad

Thanks for the quick reply. I should have checked the version numbers myself I guess. As you can see I'm using Ubuntu 11.10 so just surprised it's serving up such old versions. I'll try with the latest on Monday - I don't have access to the host in question over the weekend. Cheers.

@lad lad closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.