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

fatal error on macOS w bash #124

Open
1 task
darkn3rd opened this issue Jul 20, 2023 · 1 comment
Open
1 task

fatal error on macOS w bash #124

darkn3rd opened this issue Jul 20, 2023 · 1 comment

Comments

@darkn3rd
Copy link

When I try to source avn with . ~/.avn/bin/avn.sh, I get the following error:

Fatal Error: Cannot find module '/Users/someuser/.avn/plugins/avn-nvm'
Require stack:
- /Users/someuser/.avn/lib/plugins.js
- /Users/someuser/.avn/lib/hooks.js
- /Users/someuser/.avn/lib/avn.js
- /Users/someuser/.avn/index.js
- /Users/someuser/.avn/bin/_avn
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /Users/someuser/.avn/lib/plugins.js:59:20
    at tryCatcher (/Users/someuser/.avn/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/Users/someuser/.avn/node_modules/bluebird/js/release/reduce.js:168:18)
    at Object.gotAccum (/Users/someuser/.avn/node_modules/bluebird/js/release/reduce.js:155:25)
    at Object.tryCatcher (/Users/someuser/.avn/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/someuser/.avn/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/someuser/.avn/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/Users/someuser/.avn/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/Users/someuser/.avn/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/someuser/.avn/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/someuser/.avn/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues [as _onImmediate] (/Users/someuser/.avn/node_modules/bluebird/js/release/async.js:15:14)

My steps:

  1. npm install -g avn avn-nvm avn-n
    2 avn setup which adds config to $HOME/.zshrc despite current shell as bash
  2. add same configuration to $HOME/.bashrc and launch new terminal tab
  3. cd to project with .node-version, version doesn't change
  4. attempt to source in current shell directly with . ~/.avn/bin/avn.sh and get a fatal error.

Details

  • avn avn --version: 0.2.4
  • node node --version: v18.4.0
  • nvm nvm --version: 0.39.3
  • n n --version: n/a
  • zsh zsh --version: zsh 5.9 (arm-apple-darwin21.3.0)
  • bash bash --version: GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin21.6.0)

The output of __avn_debug in the directory with a .node-version file is:

# n/a as do not get this far

avn is loaded in my ~/.{bash|zsh}{_profile|rc} file with:

[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn

nvm specific

  • As an nvm user I am confirming that I did not install with Homebrew
@wbyoung
Copy link
Owner

wbyoung commented Jul 20, 2023

Try reinstalling.

rm -R ~/.avn

Then install.

FYI: I don't use this or really work on this project any more.

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