Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Error activating node version #37

Closed
toymachiner62 opened this issue Jan 19, 2016 · 9 comments
Closed

Error activating node version #37

toymachiner62 opened this issue Jan 19, 2016 · 9 comments

Comments

@toymachiner62
Copy link

You can see from the output below, i'm unable to successfully cd to a dir and have it switch node versions. I tried with both a version I don't have installed via nvm yet (5.0) and one that I do (5.1) and same result.

$ cd myapp/
avn could not activate node 5.0
$ nvm ls
         v5.1.0
->       system
default -> v5.1.0
node -> stable (-> v5.1.0) (default)
stable -> 5.1 (-> v5.1.0) (default)
iojs -> N/A (default)
$ node -v
v0.10.33
$ cd ../
$ cd myapp/
avn could not activate node 5.1
@wbyoung
Copy link
Owner

wbyoung commented Jan 20, 2016

Please be sure to include the appropriate debugging output.

Can you also provide the following:

  • Your shell and the version
  • The version of nvm you're using

@toymachiner62
Copy link
Author

$ nvm --version
0.29.0
$ __avn_debug
avn could not activate node 5.1
error: no plugin passed predicate
  avn-nvm: nvm exited with status: 127
/bin/bash: /Users/m089269/.nvm/nvm.sh: No such file or directory
/bin/bash: nvm: command not found
$ ls -al ~/.nvm
total 0
drwxr-xr-x   5 m089269  MFAD\Domain Users   170 Nov 25 11:14 .
drwxr-xr-x+ 74 m089269  MFAD\Domain Users  2516 Jan 19 15:55 ..
drwxr-xr-x   3 m089269  MFAD\Domain Users   102 Nov 25 11:15 alias
drwxr-xr-x   3 m089269  MFAD\Domain Users   102 Nov 25 11:14 bin
drwxr-xr-x   3 m089269  MFAD\Domain Users   102 Nov 25 11:14 versions

I'm on OSX El Capitan running the default terminal app (let me know if there's a better way to get the shell version)

@toymachiner62
Copy link
Author

Any update on this?

@wbyoung
Copy link
Owner

wbyoung commented Jan 30, 2016

@toymachiner62 it appears as though you installed via homebrew which is not supported. See:

wbyoung/avn#25
nvm-sh/nvm#469

If that's not the case, then your nvm install appears to be bad. I'd recommend re-installing. I'm going to assume that's the issue here and close this, but if it's not, you can re-open.

@wbyoung wbyoung closed this as completed Jan 30, 2016
@toymachiner62
Copy link
Author

I just reinstalled nvm via their install curl command and I'm still getting the error:

$ cd myapp/
avn could not activate node 5.1
$ __avn_debug
avn could not activate node 5.1
error: no plugin passed predicate
  avn-nvm: nvm exited with status: 127
/bin/bash: /Users/myuser/.nvm/nvm.sh: No such file or directory
/bin/bash: nvm: command not found

@wbyoung
Copy link
Owner

wbyoung commented Feb 3, 2016

The absense of the nvm.sh file at /Users/myuser/.nvm/nvm.sh strongly suggests to me that there's some sort of installation issue.

@ljharb can you confirm?

My suggestion (and please note that I don't work on nvm) would be to rm -rf ~/.nvm and try re-installing.

Also, be sure to start a new shell when re-trying avn.

@wbyoung wbyoung reopened this Feb 3, 2016
@toymachiner62
Copy link
Author

Still didn't work:

$ rm -rf ~/.nvm
$ rm -rf ~/.nvm
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7750  100  7750    0     0   9531      0 --:--:-- --:--:-- --:--:--  9532
=> Downloading nvm from git to '/Users/myuser/.nvm'
=> Cloning into '/Users/myuser/.nvm'...
remote: Counting objects: 4344, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4344 (delta 0), reused 0 (delta 0), pack-reused 4341
Receiving objects: 100% (4344/4344), 1.09 MiB | 1.88 MiB/s, done.
Resolving deltas: 100% (2544/2544), done.
Checking connectivity... done.
* (HEAD detached at v0.30.2)
  master

=> Source string already in /Users/myuser/.bashrc
npm ERR! max depth reached: hapi@>= 8, required by hapi-authorization@2.2.5
npm ERR! not ok code 0
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:

/usr/local/lib
├── bower@1.6.5
├── cordova@4.1.2
├── crontab@1.1.0 -> /Users/m089269/Sites/node-crontab
├── db-migrate@0.9.5
├── eslint@1.10.3
├── generator-cg-angular@3.1.2
├── generator-hapijs@0.1.6
├── grunt@0.4.5
├── grunt-cli@0.1.13
├── gulp@3.9.0
├─┬ hapi-authorization@2.2.5 -> /Users/m089269/Sites/hapi-authorization
│ └── hapi@>= 8
├── istanbul@0.3.6
├── karma-cli@0.0.4
├── lab@5.0.1
├── mocha@2.2.4
├── node-mongo-seeds@2.2.4
├── node-whenever@0.0.7 -> /Users/m089269/Sites/node-whenever
├── nodemon@1.7.0
├── phonegap@4.1.2-0.22.10
└── yo@1.2.1

=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm 

Closed my terminal and reopened it. cd'd to my app dir and

$ cd myapp/
avn could not activate node 5.1

$ __avn_debug
avn could not activate node 5.1
error: no plugin passed predicate
  avn-nvm: no version matching 5.1

@wbyoung
Copy link
Owner

wbyoung commented Feb 3, 2016

So now your install looks correct, but you don't have 5.1 installed nvm install 5.1.

If that doesn't work, nvm ls and report the results.

@toymachiner62
Copy link
Author

There we go! Works now. Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants