Giter VIP home page Giter VIP logo

Comments (15)

igor47 avatar igor47 commented on June 18, 2024 16

on an M1 macbook, this worked for me:

NODEJS_CONFIGURE_OPTIONS='--with-intl=full-icu --download=all' NODEJS_CHECK_SIGNATURES="no" asdf install nodejs ref:v15.7.0

without the NODEJS_CHECK_SIGNATURES="no", it failed silently (no output, but non-zero exit code). took maybe 10 minutes to build. afterwards, asdf doesn't realize that 15.7.0 is installed. i did:

cd ~/.asdf/installs/nodejs
ln -s ref-v15.7.0 15.7.0

so i can be compatible with existing .nvmrc/.node_version files

from asdf-nodejs.

toriumi0118 avatar toriumi0118 commented on June 18, 2024 7

use ref:v1.2.3 at the <version>.
asdf mentioned like this.

When you install with ref:, the asdf-nodejs will try getting source code from github.
but github does not provide checksum file, so you need to ignore it with NODEJS_CHECK_SIGNATURES='no' option.

it said 'download from github'
I need to ignore checksum

so in my case. I had to compile nodejs with full-icu.
I used it like this (it worked on fish shell).

env NODEJS_CONFIGURE_OPTIONS='--with-intl=full-icu --download=all' env NODEJS_CHECK_SIGNATURES='no' asdf install nodejs ref:v10.7.0

then you can get ref:v10.7.0 version.

from asdf-nodejs.

jaydorsey avatar jaydorsey commented on June 18, 2024 7

I stumbled across this while trying to get nodejs to install on an m1.

The ref syntax doesn't seem to work any more. The README reference linked above is replaced and the new docs only show a latest syntax; so the below doesn't work

asdf install nodejs ref:14.15.4

I don't have a solution but hopefully this helps someone who might have spent time trying this.

from asdf-nodejs.

smh avatar smh commented on June 18, 2024 6

@jaydorsey this should work:

asdf install nodejs ref:v14.15.4

Note the additional v in front of the version number. Specifically the following command worked for me:

env NODEJS_CONFIGURE_OPTIONS='--with-intl=full-icu --download=all' env NODEJS_CHECK_SIGNATURES='no' asdf install nodejs ref:v15.8.0

from asdf-nodejs.

abradburne avatar abradburne commented on June 18, 2024 5

@pawelgalazka A asdf reshim fixed that issue for me.

from asdf-nodejs.

wesleycoder avatar wesleycoder commented on June 18, 2024 2

There is any intent to fix this issue?
It has over a year and a half and it is still affecting users...

from asdf-nodejs.

desnudopenguino avatar desnudopenguino commented on June 18, 2024 2

There is any intent to fix this issue?
It has over a year and a half and it is still affecting users...

yeah, i just jumped on the asdf train on OpenBSD. it works well for the other languages i use, but node is "broken". the error message is a bit misleading as well. "Binaries were not found. Full version must be specified, not just major version." it took a little reading to figure out the actual issue (the archive was not found for my OS). i'm willing to put in some time to work on it. @toriumi0118 has a good solution, but that takes some digging to find it here in the issues. perhaps those pieces could be rolled into the script for non-supported OS's and/or a better error message implemented.

from asdf-nodejs.

pawelgalazka avatar pawelgalazka commented on June 18, 2024 2

thx @abradburne that helped 🙏

from asdf-nodejs.

Stratus3D avatar Stratus3D commented on June 18, 2024

I'm open to contributions for this. I don't think it would be terribly hard to improve things so we try to compile from source if an archive is not found for your distro. I'm happy to review any PRs for this, but as someone who doesn't use Node.JS every day implementing this feature on my own is not a priority.

from asdf-nodejs.

toothbrush avatar toothbrush commented on June 18, 2024

Just to add a comment here, in my case it'd be really nice to have a "force compilation from source" flag, too. The thing is that i'm using NixOS, which is exotic in many ways, but in my case the precompiled NodeJS binary for Linux doesn't work. But the ref:... is probably an acceptable workaround.

FWIW i've posted a feature request to asdf-vm proper: asdf-vm/asdf#811

from asdf-nodejs.

jaydorsey avatar jaydorsey commented on June 18, 2024
env NODEJS_CONFIGURE_OPTIONS='--with-intl=full-icu --download=all' env NODEJS_CHECK_SIGNATURES='no' asdf install nodejs ref:v15.8.0

This does seem to work (it's been ~45 minutes and still building!). This might be useful to spit out as an error/warning/info message when a binary can't be found. I noted it also has to be run exactly as you typed (with env which was something I didn't catch before)

If no one else grabs this, I might attempt a small PR. Displaying the above command when it can't find any binaries would have been useful enough.

from asdf-nodejs.

plicjo avatar plicjo commented on June 18, 2024

@jaydorsey oh snap. You dropped this 👑

from asdf-nodejs.

pawelgalazka avatar pawelgalazka commented on June 18, 2024

thx @igor47 this works for m1 with one exception, trick with ln -s ref-v15.7.0 15.7.0 does not seem to work for me. I created symlink but I still get an error:

$ pwd
/Users/myusername
$ echo ~
/Users/myusername
$ node -v
No preset version installed for command node
Please install a version by running one of the following:

asdf install nodejs 15.7.0

or add one of the following versions in your config file at /Users/myusername/.tool-versions
nodejs ref:v15.7.0
$ cat ~/.tool-versions 
nodejs 15.7.0
$ ls -l ~/.asdf/installs/nodejs
total 0
lrwxr-xr-x   1 myusername  staff    11 13 Aug 11:53 15.7.0 -> ref-v15.7.0
drwxr-xr-x  50 myusername  staff  1600 13 Aug 11:52 ref-v15.7.0

from asdf-nodejs.

maxirby avatar maxirby commented on June 18, 2024

I installed from source (using this command above) node 14.8.1, but I cannot push asdf to use that.

Output: No version set for command node

any help?

from asdf-nodejs.

jaydorsey avatar jaydorsey commented on June 18, 2024

I installed from source (using this command above) node 14.8.1, but I cannot push asdf to use that.

Output: No version set for command node

any help?

An asdf reshim nodejs usually resolves this for me. Ruby and a couple of the other plugins work fine without the reshim afaict.

Edit: I just saw an earlier comment noting this as well, but wasn't sure if you saw the reshim. It's usually not necessary (ruby at least). If you tried it already my apologies. Ran into this last week w/ a new computer setup and it fixed it for me.

from asdf-nodejs.

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.