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

Check for nodejs 16 or 18 and raise a helpful error message if not found #127

Closed
choldgraf opened this issue Jan 7, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@choldgraf
Copy link
Collaborator

I tried following the installation instructions and got a weird error when running any myst commands. I looked deeper and realized it was because I was running nodejs 14. The installing prerequisites section explained that I needed node 16+, but because it came after the "install myst" section, I missed it.

I'd suggest either:

  1. Check for the nodejs version and raise an error w/ a helpful message, rather than waiting for node to choke.
  2. Moving the installation pre-requisites before the "install myst" section
@choldgraf choldgraf added the bug Something isn't working label Jan 7, 2023
@rowanc1
Copy link
Member

rowanc1 commented Jan 8, 2023

Good call on bringing the pre-reqs higher in the docs. I also think that adding a way to install this through conda might be good. We tried last year but couldn't figure it out.

Node 14 end-of-life is in ~4 months, and the current features we are using aren't supported in 14, so even showing the error message is hard. We do raise helpful errors as soon as you get to 16+!! Node 14 also doesn't support the "engines" field in the package.json, so the install process doesn't even warn... :(

I think for now, I will focus attention on improving docs, and if you have any experts in conda you know, that would be amazing to get an instal through more familiar channels for python users.

@rowanc1
Copy link
Member

rowanc1 commented Jan 23, 2023

Updated the docs, going to leave this there for now!

image

I think it may be worth seeing how hard supporting 14 is when we work on some more of the packaging work. Going to think about that more in #139, where we could have some better messages in a python wrapper.

@rowanc1 rowanc1 closed this as completed Jan 23, 2023
@choldgraf
Copy link
Collaborator Author

Re: supporting earlier versions of node, my 2 cents is that it is a better use of time to find a way to install Myst cli via python (or R etc) without directly invoking node. I think the vast majority of researchers and educators have never used node and I worry this may be pretty confusing for them. Python is OK because there are a ton of "learn python for science" resources in academia, but very few people learn node or JS. So I guess my point is that I suspect there are few users that really want to use legacy node, and many users that have no idea what node is at all 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants