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

Getting an error when calling fnm use without .nvmrc or .node-version in current dir #181

Closed
klapec opened this issue Dec 28, 2019 · 2 comments

Comments

@klapec
Copy link

klapec commented Dec 28, 2019

After the 1.18.0 update I noticed that calling fnm use in a directory that has no .nvmrc or .node-version in it results in a following error:

fnm: internal error, uncaught exception:
     (Failure "Nested calls to Lwt_main.run are not allowed")
Schniz added a commit that referenced this issue Dec 29, 2019
Seems that Lwt 5 throws a weird error when using `exit(1)` inside a
promise. So instead of exiting in the command, making all executable
modules a function that returns a `result((), status_code)` is a better fit.

I'll open an issue to the Lwt repo to figure it out, anyway.
@aantron
Copy link

aantron commented Dec 29, 2019

@Schniz thanks for opening the Lwt issue!

You should be able to undo the workaround now if you pin Lwt to master, or in a week after the 5.1.1 release, which includes the fix in Lwt (ocsigen/lwt#758 (comment)). I suggest trying to pin Lwt to master in any case, as it will help to be sure that the bug is really fixed.

@aantron
Copy link

aantron commented Dec 29, 2019

(Although, looking at the code closer, it may indeed be better to stick with the result :))

@Schniz Schniz closed this as completed in 01601f5 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants