Skip to content

Can't use system as default with --use-on-cd and --version-file-strategy recursive #681

@NicolasWebDev

Description

@NicolasWebDev

Hi,

With eval "$(fnm env --version-file-strategy recursive --use-on-cd)" on my bashrc and system set as default, when opening a shell I have the following error:

error: Could not find any version to use. Maybe you don't have a default version set?
Try running `fnm default <VERSION>` to set one, or create a .node-version file inside your project to declare a Node.js version.

Creating a .node-version with "system" in my home directory doesn't solve the problem.

If I remove one of both flags, then it works. If I set default to another version, then it works. fnm default system doesn't give any error. fnm use system either.

I am using fnm-bin 1.31.0 on arch.

My use case is that I would like to always use the system version of node, and only use fnm for my work and personal projects.
Thus I can globally always have the version of node auto-update, through my package manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions