nvm icon indicating copy to clipboard operation
nvm copied to clipboard

Can't run `npm run test/fast` locally

Open PeterDaveHello opened this issue 8 years ago • 6 comments
trafficstars

Since 7f3145bc98b9355d26ee5da730fb9c4df7201b18, there is a new unit test called nvm_default_packages that I can never pass, both on Ubuntu and Mac

Error message:

    ✗ nvm_default_packages
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `npm config delete prefix` or `nvm use --delete-prefix v6.10.1` to unset it.
expected 'nvm install v6.10.1' to exit with 0, got 11
✗ nvm_default_packages
touch: /default-packages: Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-darwin-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with shasum -a 256
Checksums matched!
npm WARN invalid config loglevel="notice"
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
touch: cannot touch '/default-packages': Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0
    ✗ nvm_default_packages
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
npm WARN invalid config loglevel="notice"
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0

PeterDaveHello avatar Jun 23 '17 05:06 PeterDaveHello

Ah, it looks like https://github.com/creationix/nvm/commit/7f3145bc98b9355d26ee5da730fb9c4df7201b18#diff-dccf2674cdf264bd0505a3215222bf06R3 defines FILE before NVM_DIR is available (before sourcing nvm.sh).

Since travis always provides this env var, it always passes in CI.

ljharb avatar Jun 24 '17 00:06 ljharb

I think we just solved this the other day, right? With PR https://github.com/nvm-sh/nvm/pull/2182 (Reversing the order of FILE and nvm.sh.)

memark avatar Apr 02 '20 09:04 memark

I'm not sure if this was solved, I can't pass the npm run test/fast tests locally yet.

PeterDaveHello avatar Apr 14 '20 13:04 PeterDaveHello

just reboot and click again

On Tue, 14 Apr 2020 at 07:35, Peter Dave Hello [email protected] wrote:

I'm not sure if this was solved, I can't pass the npm run test/fast tests locally yet.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nvm-sh/nvm/issues/1563#issuecomment-613446166, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFTVURTGCB4U5OKV2K3NI3RMRRDPANCNFSM4DQMSNWQ .

mikeymandm avatar Apr 14 '20 16:04 mikeymandm

That was just one or two failures; i believe there's still some more - PRs welcome.

ljharb avatar Apr 14 '20 16:04 ljharb