Do you use the emsdk version of node?

431 views
Skip to first unread message

Sam Clegg

unread,
Sep 17, 2022, 2:03:23 PM9/17/22
to emscripte...@googlegroups.com
;tldr; Please respond if you use the emsdk version of node?

The current behaviour of emsdk is to put its version of node at the front of the $PATH when the sdk is installed.  Some folks have found this confusing/annoying.  For background on this see:
and:

Emscripten itself doesn't uses node from the PATH (it always uses the config file) so it not needed internally, but the fear is that some users (who don't otherwise have node installed on their system) have come to depend on the emsdk version of node for running emscripten output. e.g. running tests.

I'd like to know who many folks are actually using the emsdk version of node.  For example, do you run tests using this version node?    If we didn't add it to your PATH by default would that be annoying/confusing for you?

cheers,
sam

Brion Vibber

unread,
Sep 17, 2022, 4:43:49 PM9/17/22
to emscripte...@googlegroups.com
On Sat, Sep 17, 2022 at 11:03 AM 'Sam Clegg' via emscripten-discuss <emscripte...@googlegroups.com> wrote:

I'd like to know who many folks are actually using the emsdk version of node.  For example, do you run tests using this version node?    If we didn't add it to your PATH by default would that be annoying/confusing for you?

I guess I "use" it because when I run "npm" and "node" in my build process that's what gets run. But I would absolutely never choose it, and I would strongly prefer not to have a bundled node at all.

-- brion

Floh

unread,
Sep 18, 2022, 11:48:06 AM9/18/22
to emscripten-discuss
> ...and I would strongly prefer not to have a bundled node at all.

Hmm, I have the opposite opinion tbh, Node *should* be bundled, but shouldn't be added to the path (so that the bundled version doesn't collide with any globally installed version), and the Emscripten SDK shouldn't accidentially call any globally installed node version (only the bundled one).

I'd prefer this because at work I'm seeing that projects often depend on older node/npm versions (at least there's nvm to easily switch between versions), but having Emscripten depend on a globally installed node version would only add to the confusion (and probably swamp the Emscripten team with bugs which would actually be node compatibility issues). Same with python2 vs python3.

Brion Vibber

unread,
Sep 18, 2022, 2:20:34 PM9/18/22
to emscripte...@googlegroups.com
On Sun, Sep 18, 2022 at 8:48 AM Floh <flo...@gmail.com> wrote:
> ...and I would strongly prefer not to have a bundled node at all.

Hmm, I have the opposite opinion tbh, Node *should* be bundled, but shouldn't be added to the path (so that the bundled version doesn't collide with any globally installed version), and the Emscripten SDK shouldn't accidentially call any globally installed node version (only the bundled one).

I'd prefer this because at work I'm seeing that projects often depend on older node/npm versions (at least there's nvm to easily switch between versions), but having Emscripten depend on a globally installed node version would only add to the confusion (and probably swamp the Emscripten team with bugs which would actually be node compatibility issues). Same with python2 vs python3.

*nod* that's sensible enough -- node has felt stabler than python during the 2/3 switch, but node isn't free of back-compat problems too. :)

I'd be fine with bundling it for internal usage, as long as it's out of the PATH.

-- brion

Shlomi Fish

unread,
Sep 18, 2022, 8:21:01 PM9/18/22
to Floh, emscripte...@googlegroups.com
hi all,

see https://github.com/shlomif/emsdk/tree/skip-npm .
--

Shlomi Fish https://www.shlomifish.org/
Best Introductory Programming Language - https://shlom.in/intro-lang

George: I guess you can enter now. I’m just following orders.
SGlau: The Nuremberg defense!
George: This place gives you no other option.
https://www.shlomifish.org/humour/Summerschool-at-the-NSA/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Sam Clegg

unread,
Sep 19, 2022, 7:07:41 AM9/19/22
to emscripte...@googlegroups.com
It sounds like you both agree with folks on the issue that bundling node (and internally using the bundled node) is find/good but adding it to the PATH is not desirable.

I think we have come up with a proposed solution where `./emsdk_env.sh` will, by default, only install emcc into the path.  

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTnHh1%2BTFZ5v3uwEzTSrxFqAZ1ZH%3DO3arfQce9CWNkOC4Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages