Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xo_fix 127] /usr/bin/env: 'node': No such file or directory when using nvm #27

Open
IPWright83 opened this issue May 12, 2021 · 4 comments

Comments

@IPWright83
Copy link

I keep getting this error from the plugin when I've enabled

{
    "fix_on_save": true,
}

I've already configured my Sublime linter settings, is there something else I need to do?

// SublimeLinter Settings - User
{
    "paths": {
        "linux": ["/home/ian/.nvm/versions/node/v14.16.0/bin/node"]
    },
    "linters": {
        "xo": {
            "env": {
                "PATH": "/home/ian/.nvm/versions/node/v14.16.0/bin:$PATH"
            }
        }
    }
}
@sindresorhus
Copy link
Member

We probably need to fetch the node path from SublimeLinter and use it here:

[self.xo_path, '--stdin', '--fix'],

@sindresorhus
Copy link
Member

// @LuKks

@sindresorhus
Copy link
Member

Generally, I would recommend not using nvm. It causes so many problems like these. I have seen hundreds of problems caused by nvm in the past years.

@IPWright83
Copy link
Author

Thanks @sindresorhus, at the moment I've created a symbolic link to deal with the issue https://stackoverflow.com/a/21236122/21061

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

No branches or pull requests

2 participants