Code Monkey home page Code Monkey logo

Comments (8)

shadowspawn avatar shadowspawn commented on August 25, 2024 1

and it couldn't switch my active install

That sounds like an issue with node installed twice, likely once into /usr/bin (by some other process) and into /usr/local/bin by n. The version which is found depends on the order of directories in the PATH environment variable.

If you run n doctor it will check for this situation.

from n.

Lovasz-Akos avatar Lovasz-Akos commented on August 25, 2024

fixed by using the POSIX compliant version on the POSIX branch

from n.

shadowspawn avatar shadowspawn commented on August 25, 2024

What version of Bash are you using in the failing environment?

There is some interesting syntax on that line, so maybe a really old or really new version of Bash is complaining:

n/bin/n

Line 108 in 02a8fe0

CURL_OPTIONS=( "--location" "--fail" "--show-error" )

from n.

Lovasz-Akos avatar Lovasz-Akos commented on August 25, 2024

I'm using sh, not bash, that might be the issue here

from n.

shadowspawn avatar shadowspawn commented on August 25, 2024

The n script starts with a shebang interpreter directive to use bash:

n/bin/n

Line 1 in 02a8fe0

#!/usr/bin/env bash

So in theory you can use sh (or zsh et al) as your shell, but the n script is interpreted using bash.

What version of Bash are you using in the failing environment?

Assuming you have a bash available, what I meant was what version is it? For example, I see:

% bash --version 
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

from n.

Lovasz-Akos avatar Lovasz-Akos commented on August 25, 2024

Sadly no bash, it's a super barebones buildroot system i'm testing, I don't even have apt or curl which makes changing node versions...difficult. n comes to save the day, since I do have npm, but that syntax breaks on sh. #751 's changes fix this so I'm looking forward to it's merge or completion :)

from n.

shadowspawn avatar shadowspawn commented on August 25, 2024

Thanks for the info. A vote for the posix compatible version. :-)

from n.

Lovasz-Akos avatar Lovasz-Akos commented on August 25, 2024

(although it acted a little strange on my try, n's tui only saw the version it installed and not the one already present on the system, and it couldn't switch my active install)

from n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.