Created
November 22, 2011 14:26
-
-
Save slaskis/1385771 to your computer and use it in GitHub Desktop.
NPM throws an error when using the outdated() API method after using ls().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/cache.js:212 | |
var p = url.parse(spec.replace(/^git\+/, "git")) || {} | |
^ | |
TypeError: Object #<Object> has no method 'replace' | |
at add (/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/cache.js:212:26) | |
at Function.add (/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/cache.js:174:10) | |
at shouldUpdate (/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/outdated.js:141:9) | |
at /Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/outdated.js:115:7 | |
at /Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/node_modules/slide/lib/async-map.js:54:35 | |
at Array.forEach (native) | |
at /Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/node_modules/slide/lib/async-map.js:54:11 | |
at Array.forEach (native) | |
at asyncMap (/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/node_modules/slide/lib/async-map.js:53:8) | |
at next (/Users/slaskis/Desktop/Ideas/nodepress/node_modules/npm/lib/outdated.js:114:5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npm = require('npm'); | |
npm.load(function(){ | |
npm.commands.ls() // if removed it doesn't throw | |
npm.commands.outdated() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"author": "Robert Sköld <[email protected]>", | |
"name": "fail", | |
"description": "A test case with npm", | |
"version": "0.1.0", | |
"dependencies": { | |
"npm": "~1.0.106" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment