Cannot call 'trim' of undefined - related to semver on package installation after an upgrade to npm 0.3.0 #607

Closed
ncb000gt opened this Issue Feb 18, 2011 · 5 comments

Projects

None yet

2 participants

@ncb000gt

Attempted to install a few modules with the latest npm, this was after using npm update npm which successfully brought me up to 0.3.0.

    sudo npm install express connect jade  
    npm info it worked if it ends with ok  
    npm info using npm@0.3.0-8  
    npm info using node@v0.4.0  
    npm info fetch http://registry.npmjs.org/express/-/express-1.0.7.tgz
    npm info fetch http://registry.npmjs.org/connect/-/connect-0.5.10.tgz
    npm info fetch http://registry.npmjs.org/jade/-/jade-0.6.3.tgz
    npm info calculating sha1 /tmp/npm-1298007574174/12980075741750.7525687313172966/tmp.tgz
    npm info shasum ccb14eee039e4177ce410fe5f074e96f68629e6c
    npm info calculating sha1 /usr/local/lib/node/.npm/.cache/express/1.0.7/package.tgz
    npm info shasum 4252a9b76b1abc8a9cb9d57e89f5e17f8f2fb9cc
    npm info calculating sha1 /tmp/npm-1298007574174/1298007574300-0.25535598397254944/tmp.tgz
    npm info shasum 4fb43aedba8df180b6352cfd3d1a2e478ae98dd3
    npm info calculating sha1 /usr/local/lib/node/.npm/.cache/jade/0.6.3/package.tgz
    npm info shasum 48e3babdc9a6650383792e38df90733b5665a71e
    npm info calculating sha1 /tmp/npm-1298007574174/1298007574297-0.5972126377746463/tmp.tgz
    npm info shasum 195e2559142833df008e5be429f4a3b41238c7dd
    npm info calculating sha1 /usr/local/lib/node/.npm/.cache/connect/0.5.10/package.tgz
    npm info shasum 4f452e43dcc79fea09fa4eaad9e5af1a0e010a05
    npm info range qs@>= 0.0.6
    npm info fetch http://registry.npmjs.org/qs/-/qs-0.0.6.tgz
    npm info calculating sha1 /tmp/npm-1298007574174/1298007575015-0.8582044024951756/tmp.tgz
    npm info shasum 481659b7e5bf6a5ea898010de5aed35eb469e124
    npm info calculating sha1 /usr/local/lib/node/.npm/.cache/qs/0.0.6/package.tgz
    npm info shasum d3709605a9648d4f671adaa229eb5af773e4d791
    npm info preinstall express@1.0.7
    npm info preinstall connect@0.5.10
    npm info preinstall jade@0.6.3
    npm info preinstall qs@0.0.6
    npm info install express@1.0.7
    npm info postinstall express@1.0.7
    npm info preactivate express@1.0.7
    npm info activate express@1.0.7
    npm info postactivate express@1.0.7
    npm info preupdatedependents express@1.0.7
    npm info updatedependents express@1.0.7
    npm info postupdatedependents express@1.0.7
    npm info updated dependents [ 'express@1.0.7' ]
    npm info install connect@0.5.10
    npm info postinstall connect@0.5.10
    npm info predeactivate connect@0.5.9
    npm info deactivate connect@0.5.9
    npm info postdeactivate connect@0.5.9
    npm info preactivate connect@0.5.10
    npm info activate connect@0.5.10
    npm info postactivate connect@0.5.10
    npm info install jade@0.6.3
    npm info postinstall jade@0.6.3
    npm info preactivate jade@0.6.3
    npm info activate jade@0.6.3
    npm info postactivate jade@0.6.3
    npm info install qs@0.0.6
    npm info postinstall qs@0.0.6
    npm info predeactivate qs@0.0.4
    npm info deactivate qs@0.0.4
    npm info postdeactivate qs@0.0.4
    npm info preactivate qs@0.0.6
    npm info activate qs@0.0.6
    npm info postactivate qs@0.0.6
    npm info preupdatedependents qs@0.0.6
    npm ERR! TypeError: Cannot call method 'trim' of undefined
    npm ERR!     at toComparators (/usr/local/lib/node/.npm/npm/0.3.0-8/package/node_modules/semver/semver.js:62:16)
    npm ERR!     at Object.satisfies (/usr/local/lib/node/.npm/npm/0.3.0-8/package/node_modules/semver/semver.js:157:11)
    npm ERR!     at /usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/update-dependents.js:144:24
    npm ERR!     at /usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/load-package-defaults.js:36:25
    npm ERR!     at cb (/usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/async-map.js:48:28)
    npm ERR!     at /usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/load-package-defaults.js:152:12
    npm ERR!     at cb (/usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/async-map.js:48:28)
    npm ERR!     at /usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/find.js:23:20
    npm ERR!     at cb (/usr/local/lib/node/.npm/npm/0.3.0-8/package/lib/utils/graceful-fs.js:31: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``

While I was concerned at first, I figured I might as well try to update semver and see if that fixed the problem (I hadn't cleared the cache npm cache clean nor removed ~/.node_libraries at this point).

    sudo npm install semver              
    npm info it worked if it ends with ok
    npm info using npm@0.3.0-8
    npm info using node@v0.4.0
    npm info fetch http://registry.npmjs.org/semver/-/semver-1.0.0.tgz
    npm info calculating sha1 /tmp/npm-1298007650166/1298007650166-0.7683921775314957/tmp.tgz
    npm info shasum 11f18a0c08ed21c988fc2b0257f1951969816615
    npm info calculating sha1 /usr/local/lib/node/.npm/.cache/semver/1.0.0/package.tgz
    npm info shasum 188540abaa01d7a3a0f5d3bb0afe71fbbd51a1cc
    npm info preinstall semver@1.0.0
    npm info install semver@1.0.0
    npm info postinstall semver@1.0.0
    npm info preactivate semver@1.0.0
    npm info activate semver@1.0.0
    npm info postactivate semver@1.0.0
    npm info build Success: semver@1.0.0
    npm ok

I tried the first command again and all was well. I'm reporting this only because it was something I ran into- I'm not sure it's a bug with the update from previous versions to 0.3.0 or a manifestation of my setup.

@ncb000gt

Ignore those <a href lines...those weren't in the output.

@isaacs
Member
isaacs commented Feb 18, 2011

Ignore those <a href lines...those weren't in the output.

Yeah, github thinks all sha's are commits.

@ncb000gt

Yea, I gathered. Just noticed that they showed up differently than the actual error and thought I'd note it.

@isaacs
Member
isaacs commented Feb 18, 2011

Closed by 390f227 Fix semver to not split undefined

@isaacs
Member
isaacs commented Feb 18, 2011

landed 0.3.0-9

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment