How do I install and use last version of dfx with dfxvm?!?

❯ dfxvm list
0.15.2
0.17.0
0.18.0 (default)

❯ dfxvm default
0.18.0

❯ dfx --version
dfx 0.15.2

(restart terminal)

❯ dfx --version
dfx 0.15.2

❯ sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
> Proceed with installation (default)
dfxvm is installed now.

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
the dfxvm bin directory.

To configure your shell, run:
  source "$HOME/Library/Application Support/org.dfinity.dfx/env"

exit

❯ dfx --version
dfx 0.15.2

(restart terminal)

❯ dfx --version
dfx 0.15.2

❯ DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
dfxvm is installed now.

❯ dfx --version
dfx 0.15.2

(restart terminal)

❯ dfx --version
dfx 0.15.2

How do I install and use last version of dfx with dfxvm?!?

I was running the command lines in a folder containing a dfx.json file that specifies "dfx": "0.15.2", so I guess it always displays that version instead of displaying the tool’s version.

A bit a surprising, anyway.

1 Like

You should run!

dfxvm update

or

dfxvm install 0.18.0

and set it

dfxvm default 0.18.0

I always use external terminal for starting dfx and delete dfx version inside dfx.json, and also .env file for project environment is important!

1 Like