nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
MIT License
80.42k stars 8.03k forks source link

test/slow overwrite npm #949

Open kui opened 8 years ago

kui commented 8 years ago

Why do npm run test/slow overwrite npm ?

$ nvm install v5.3.0
Downloading https://nodejs.org/dist/v5.3.0/node-v5.3.0-darwin-x64.tar.xz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
Now using node v5.3.0 (npm v3.3.12)
$ nvm current
v5.3.0
$ node --version
v5.3.0
$ npm --version
3.3.12
$ npm run test/slow
# ...

Done, took 169 seconds.
5 tests passed.
12 tests failed.
make: *** [test-zsh] Error 12

npm ERR! Darwin 15.2.0
npm ERR! argv "/Users/kui/.nvm/versions/node/v5.3.0/bin/node" "/Users/kui/.nvm/versions/node/v5.3.0/bin/npm" "run" "test/slow"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! nvm@0.29.0 test/slow: `shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nvm@0.29.0 test/slow script 'shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nvm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell
npm ERR! You can get their info via:
npm ERR!     npm owner ls nvm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/kui/nvm/npm-debug.log
$ nvm current
v5.3.0
$ node --version
v5.3.0
$ npm --version
1.4.29
ljharb commented 8 years ago

that's very strange - what does which node, which npm, and nvm debug say after the test is run?

kui commented 8 years ago

1) the loaded nvm and the testing nvm are difference:

$ pwd
/Users/JP20765/workspace
$ echo $NVM_DIR
/Users/JP20765/.nvm
$ nvm install v5.3.0
# ...
Now using node v5.3.0 (npm v3.3.12)
$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
3.3.12
$ git clone git@github.com:kui/nvm.git
# ...
$ cd nvm
$ npm install
# ...

$ npm run test/slow
# ... (too many error outputs)
Done, took 132 seconds.
5 tests passed.
12 tests failed.
make: *** [test-zsh] Error 12
# ...

$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
1.4.29
$ nvm debug
nvm --version: v0.29.0
$SHELL: /Users/JP20765/.homebrew/bin/zsh
$HOME: /Users/JP20765
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v5.3.0
which node: $NVM_DIR/versions/node/v5.3.0/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v5.3.0/bin/npm
npm config get prefix: npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
$NVM_DIR/versions/node/v5.3.0
npm root -g: npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
$NVM_DIR/versions/node/v5.3.0/lib/node_modules

2) the loaded nvm and the testing nvm are the same:

$ pwd
/Users/JP20765/.nvm
$ git branch
* master
$ nvm --version
0.29.0
$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
3.3.12
$ npm install
# ...
$ npm run test/slow
# ...
    nvm reinstall-packages
######################################################################## 100.0%
######################################################################## 100.0%
    ✓ Running "nvm copy-packages $(nvm ls current)" should error out
    ✗ should work as expected
Running node v0.10.28 (npm v1.4.9)
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npm/bin/npm-cli.js
npm@1.4.29 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npm
Running node v0.10.29 (npm v1.4.14)
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npm/bin/npm-cli.js
npm@1.4.29 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npm
Now using node v0.10.28 (npm v1.4.9)
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/test-npmlink -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/test-npmlink/index.js
/Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/test-npmlink -> /Users/JP20765/.nvm/test/slow/nvm reinstall-packages/test-npmlink
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/marked -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/marked/bin/marked
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/recursive-blame -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/recursive-blame/index.js
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npmlist -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npmlist/bin/npmlist

> spawn-sync@1.0.14 postinstall /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/spawn-sync
> node postinstall

Installing native dependencies (this may take up to a minute)
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/grunth -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/grunth-cli/bin/grunth
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/grunt -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/grunt-cli/bin/grunt
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/http-server -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/http-server/bin/http-server
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/hs -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/http-server/bin/http-server
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/uglifyjs -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/uglify-js/bin/uglifyjs
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/yo -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/yo/lib/cli.js

> yo@1.5.1 postinstall /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ No .bowerrc file in home directory
✔ NODE_PATH matches the npm root
✖ Node.js version

Your Node.js version is outdated.
Upgrade to the latest version: https://nodejs.org

✔ No .yo-rc.json file in home directory
✖ npm version

Your npm version is outdated.

Upgrade to the latest version by running:
npm install -g npm

Found potential issues on your machine :(
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node-gyp -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/node-gyp/bin/node-gyp.js
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/jshint -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/jshint/bin/jshint
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/eslint -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/eslint/bin/eslint.js
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/david -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/david/bin/david.js
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/bower -> /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/bower/bin/bower
marked@0.3.5 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/marked

recursive-blame@0.2.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/recursive-blame
├── git-tools@0.0.8
├── colors@0.6.2
└── minimist@0.0.8

npmlist@3.1.0 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/npmlist
└── chalk@1.1.1 (escape-string-regexp@1.0.4, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)

grunth-cli@1.3.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/grunth-cli
├── semver@5.1.0
└── findup-sync@0.2.1 (glob@4.3.5)

grunt-cli@0.1.13 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/grunt-cli
├── nopt@1.0.10 (abbrev@1.0.7)
├── resolve@0.3.1
└── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.2)

http-server@0.8.5 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/http-server
├── opener@1.4.1
├── corser@2.0.0
├── http-proxy@1.12.0 (eventemitter3@1.1.1, requires-port@0.0.1)
├── colors@1.0.3
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
├── portfinder@0.4.0 (async@0.9.0, mkdirp@0.5.1)
├── union@0.4.4 (qs@2.3.3)
└── ecstatic@0.7.6 (url-join@0.0.1, mime@1.3.4, he@0.5.0, minimist@1.2.0)

uglify-js@2.6.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/uglify-js
├── uglify-to-browserify@1.0.2
├── async@0.2.10
├── yargs@3.10.0 (camelcase@1.2.1, window-size@0.1.0, decamelize@1.1.2, cliui@2.1.0)
└── source-map@0.5.3

spawn-sync@1.0.14 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/spawn-sync
├── os-shim@0.1.3
└── concat-stream@1.5.1 (inherits@2.0.1, typedarray@0.0.6, readable-stream@2.0.5)

yo@1.5.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/yo
├── titleize@1.0.0
├── figures@1.4.0
├── user-home@2.0.0 (os-homedir@1.0.1)
├── sort-on@1.2.2 (arrify@1.0.1, dot-prop@2.2.0)
├── string-length@1.0.1 (strip-ansi@3.0.0)
├── repeating@2.0.0 (is-finite@1.0.1)
├── humanize-string@1.0.1 (decamelize@1.1.2)
├── root-check@1.0.0 (downgrade-root@1.1.0, sudo-block@1.2.0)
├── yeoman-character@1.1.0 (supports-color@3.1.2)
├── opn@3.0.3 (object-assign@4.0.1)
├── yosay@1.1.0 (ansi-regex@2.0.0, word-wrap@1.1.0, pad-component@0.0.1, ansi-styles@2.1.0, taketalk@1.0.0, strip-ansi@3.0.0, minimist@1.2.0, string-width@1.0.1)
├── chalk@1.1.1 (escape-string-regexp@1.0.4, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── configstore@1.4.0 (os-tmpdir@1.0.1, object-assign@4.0.1, graceful-fs@4.1.2, xdg-basedir@2.0.0, uuid@2.0.1, osenv@0.1.3, write-file-atomic@1.1.4, mkdirp@0.5.1)
├── cross-spawn-async@2.1.1 (lru-cache@3.2.0, which@1.2.1)
├── async@1.5.0
├── package-json@2.3.0 (registry-url@3.0.3, rc@1.1.5, semver@5.1.0)
├── inquirer@0.11.0 (strip-ansi@3.0.0, ansi-escapes@1.1.0, cli-width@1.1.0, through@2.3.8, ansi-regex@2.0.0, run-async@0.1.0, cli-cursor@1.0.2, readline2@1.0.1, rx-lite@3.1.2)
├── fullname@2.1.0 (pify@2.3.0, pinkie-promise@2.0.0, npmconf@2.1.2)
├── npm-keyword@4.2.0 (object-assign@4.0.1, pinkie-promise@2.0.0, registry-url@3.0.3)
├── read-pkg-up@1.0.1 (find-up@1.1.0, read-pkg@1.1.0)
├── meow@3.6.0 (trim-newlines@1.0.0, camelcase-keys@2.0.0, redent@1.0.0, object-assign@4.0.1, loud-rejection@1.2.0, normalize-package-data@2.3.5, minimist@1.2.0)
├── insight@0.7.0 (object-assign@4.0.1, lodash.debounce@3.1.1, tough-cookie@2.2.1, os-name@1.0.3, inquirer@0.10.1, request@2.67.0)
├── update-notifier@0.5.0 (is-npm@1.0.0, repeating@1.1.3, latest-version@1.0.1, semver-diff@2.1.0)
├── yeoman-environment@1.4.0 (log-symbols@1.0.2, grouped-queue@0.3.2, escape-string-regexp@1.0.4, text-table@0.2.0, untildify@2.1.0, debug@2.2.0, globby@4.0.0, diff@2.2.1, mem-fs@1.1.2)
├── got@5.3.0 (lowercase-keys@1.0.0, is-stream@1.0.1, timed-out@2.0.0, is-redirect@1.0.0, is-plain-obj@1.1.0, unzip-response@1.0.0, node-status-codes@1.0.0, object-assign@4.0.1, url-parse-lax@1.0.0, create-error-class@2.0.1, pinkie-promise@2.0.0, parse-json@2.2.0, read-all-stream@3.0.1, duplexify@3.4.2)
├── yeoman-doctor@2.0.0 (object-values@1.0.0, log-symbols@1.0.2, each-async@1.1.1, bin-version-check@2.1.0, semver@5.1.0, twig@0.8.5)
└── lodash@3.10.1

node-gyp@3.2.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/node-gyp
├── osenv@0.1.3 (os-tmpdir@1.0.1, os-homedir@1.0.1)
├── graceful-fs@4.1.2
├── nopt@3.0.6 (abbrev@1.0.7)
├── semver@5.1.0
├── which@1.2.1 (is-absolute@0.1.7)
├── minimatch@1.0.0 (sigmund@1.0.1, lru-cache@2.7.3)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── fstream@1.0.8 (inherits@2.0.1)
├── path-array@1.0.0 (array-index@0.1.1)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.3, minimatch@2.0.10, inflight@1.0.4)
├── rimraf@2.5.0 (glob@6.0.2)
├── tar@2.2.1 (inherits@2.0.1, block-stream@0.0.8)
├── npmlog@1.2.1 (ansi@0.3.0, are-we-there-yet@1.0.5, gauge@1.2.2)
└── request@2.67.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.5, tunnel-agent@0.4.2, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, combined-stream@1.0.5, node-uuid@1.4.7, qs@5.2.0, mime-types@2.1.8, tough-cookie@2.2.1, form-data@1.0.0-rc3, bl@1.0.0, http-signature@1.1.0, har-validator@2.0.3, hawk@3.1.2)

jshint@2.9.1-rc2 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/jshint
├── strip-json-comments@1.0.4
├── exit@0.1.2
├── console-browserify@1.1.0 (date-now@0.1.4)
├── shelljs@0.3.0
├── minimatch@2.0.10 (brace-expansion@1.1.2)
├── cli@0.6.6 (glob@3.2.11)
├── htmlparser2@3.8.3 (domelementtype@1.3.0, entities@1.0.0, domhandler@2.3.0, readable-stream@1.1.13, domutils@1.5.1)
└── lodash@3.7.0

autoprefixer@6.2.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/autoprefixer
├── normalize-range@0.1.2
├── num2fraction@1.2.2
├── postcss-value-parser@3.2.3
├── browserslist@1.0.1
├── postcss@5.0.13 (supports-color@3.1.2, js-base64@2.1.9, source-map@0.5.3)
└── caniuse-db@1.0.30000382

eslint@1.10.3 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/eslint
├── escape-string-regexp@1.0.4
├── path-is-absolute@1.0.0
├── object-assign@4.0.1
├── path-is-inside@1.0.1
├── xml-escape@1.0.0
├── strip-json-comments@1.0.4
├── estraverse-fb@1.3.1
├── globals@8.15.0
├── estraverse@4.1.1
├── user-home@2.0.0 (os-homedir@1.0.1)
├── text-table@0.2.0
├── esutils@2.0.2
├── is-resolvable@1.0.0 (tryit@1.0.2)
├── debug@2.2.0 (ms@0.7.1)
├── chalk@1.1.1 (supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── json-stable-stringify@1.0.0 (jsonify@0.0.0)
├── minimatch@3.0.0 (brace-expansion@1.1.2)
├── lodash.merge@3.3.2 (lodash._arrayeach@3.0.0, lodash._arraycopy@3.0.0, lodash.isarguments@3.0.4, lodash._getnative@3.9.1, lodash.istypedarray@3.0.2, lodash.isarray@3.0.4, lodash.keys@3.1.2, lodash.keysin@3.0.8, lodash.toplainobject@3.0.0, lodash._createassigner@3.1.1, lodash.isplainobject@3.2.0)
├── doctrine@0.7.2 (isarray@0.0.1, esutils@1.1.6)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── optionator@0.6.0 (fast-levenshtein@1.0.7, type-check@0.3.1, deep-is@0.1.3, levn@0.2.5, wordwrap@0.0.3, prelude-ls@1.1.2)
├── glob@5.0.15 (inherits@2.0.1, once@1.3.3, inflight@1.0.4)
├── lodash.omit@3.1.0 (lodash._arraymap@3.0.0, lodash._pickbyarray@3.0.2, lodash.restparam@3.6.1, lodash._bindcallback@3.0.1, lodash.keysin@3.0.8, lodash._pickbycallback@3.0.0, lodash._basedifference@3.0.3, lodash._baseflatten@3.1.4)
├── shelljs@0.5.3
├── lodash.clonedeep@3.0.2 (lodash._bindcallback@3.0.1, lodash._baseclone@3.3.0)
├── concat-stream@1.5.1 (inherits@2.0.1, typedarray@0.0.6, readable-stream@2.0.5)
├── espree@2.2.5
├── is-my-json-valid@2.12.3 (jsonpointer@2.0.0, generate-function@2.0.0, xtend@4.0.1, generate-object-property@1.2.0)
├── file-entry-cache@1.2.4 (flat-cache@1.0.10)
├── inquirer@0.11.0 (strip-ansi@3.0.0, ansi-regex@2.0.0, figures@1.4.0, ansi-escapes@1.1.0, cli-width@1.1.0, through@2.3.8, cli-cursor@1.0.2, run-async@0.1.0, readline2@1.0.1, rx-lite@3.1.2, lodash@3.10.1)
├── handlebars@4.0.5 (async@1.5.0, optimist@0.6.1, source-map@0.4.4)
├── js-yaml@3.4.5 (esprima@2.7.1, argparse@1.0.3)
└── escope@3.3.0 (esrecurse@3.1.1, es6-weak-map@2.0.1, es6-map@0.1.3)

david@7.0.0 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/david
├── xtend@4.0.1
├── minimist@1.2.0
├── async@1.5.0
├── semver@5.1.0
├── cli-table@0.3.1 (colors@1.0.3)
├── cli-color-tty@2.0.0 (cli-color@1.1.0)
└── npm@3.5.2

bower@1.7.1 /Users/JP20765/.nvm/versions/node/v5.3.0/lib/node_modules/bower
└── semver-utils@1.1.1
Now using node v0.10.29 (npm v1.4.14)
VERSION=''
Reinstalling global packages from v0.10.28...
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'test-npmlink' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 15.2.0
npm ERR! command "/Users/JP20765/.nvm/v0.10.29/bin/node" "/Users/JP20765/.nvm/v0.10.29/bin/npm" "install" "-g" "--quiet" "autoprefixer@6.2.1" "bower@1.7.1" "david@7.0.0" "eslint@1.10.3" "grunt-cli@0.1.13" "grunth-cli@1.3.1" "http-server@0.8.5" "jshint@2.9.1-rc2" "marked@0.3.5" "node-gyp@3.2.1" "npmlist@3.1.0" "recursive-blame@0.2.1" "spawn-sync@1.0.14" "test-npmlink@0.0.1" "uglify-js@2.6.1" "yo@1.5.1"
npm ERR! cwd /Users/JP20765/.nvm/test/slow/nvm reinstall-packages
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/JP20765/.nvm/test/slow/nvm reinstall-packages/npm-debug.log
npm ERR! not ok code 0
Linking global packages from v0.10.28...
original packages matched final packages (autoprefixer bower david eslint grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame spawn-sync test-npmlink uglify-js yo)
# ...
Done, took 241 seconds.
16 tests passed.
1 test failed.
# ...
$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
1.4.29

$ nvm debug
nvm --version: v0.29.0
$SHELL: /Users/JP20765/.homebrew/bin/zsh
$HOME: /Users/JP20765
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v5.3.0
which node: $NVM_DIR/versions/node/v5.3.0/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v5.3.0/bin/npm
npm config get prefix: npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
$NVM_DIR/versions/node/v5.3.0
npm root -g: npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated   npm -g install npm@latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
$NVM_DIR/versions/node/v5.3.0/lib/node_modules
kui commented 8 years ago

3) Success case (which invoke make directly with NVM_DIR):

$ pwd
/Users/JP20765/workspace
$ echo $NVM_DIR
/Users/JP20765/.nvm
$ nvm install v5.3.0
# ...
Now using node v5.3.0 (npm v3.3.12)
$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
3.3.12
$ git clone git@github.com:kui/nvm.git
# ...
$ cd nvm
$ npm install
# ...

$ NVM_DIR=$PWD make TEST_SUITE=slow test-zsh
# ...
Done, took 168 seconds.
17 tests passed.
0 tests failed.

$ which node; which npm
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/node
/Users/JP20765/.nvm/versions/node/v5.3.0/bin/npm
$ node --version
v5.3.0
$ npm --version
3.3.12
$ nvm debug
nvm --version: v0.29.0
$SHELL: /Users/JP20765/.homebrew/bin/zsh
$HOME: /Users/JP20765
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v5.3.0
which node: $NVM_DIR/versions/node/v5.3.0/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v5.3.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v5.3.0
npm root -g: $NVM_DIR/versions/node/v5.3.0/lib/node_modules
ljharb commented 8 years ago

Ah - tests don't really work locally unless you're running them out of ~/.nvm, likely due to a combination of urchin and environment variable passthrough.

In other words, I do my testing out of my main nvm directory.

kui commented 8 years ago

humm... Could you show me the commands to test with npm. I couldn't test right according to README.