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

"emsdk activate tot" installs a very old npm version #1048

Closed
shlomif opened this issue May 17, 2022 · 8 comments
Closed

"emsdk activate tot" installs a very old npm version #1048

shlomif opened this issue May 17, 2022 · 8 comments

Comments

@shlomif
Copy link
Contributor

shlomif commented May 17, 2022

shlomif[fcs]:$trunk/fc-solve/source$ emsdk activate tot
Setting the following tools as active:
   node-14.18.2-64bit
   releases-upstream-8500263d4e0974bf29c9d02ed7bcf2720c1c3995-64bit

Next steps:
- To conveniently access emsdk tools from the command line,
  consider adding the following directories to your PATH:
    /home/shlomif/Download/unpack/prog/llvm-to-js/emsdk
    /home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/node/14.18.2_64bit/bin
    /home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/upstream/emscripten
- This can be done for the current shell by running:
    source "/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/emsdk_env.sh"
- Configure emsdk in your shell startup scripts by running:
    echo 'source "/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/emsdk_env.sh"' >> $HOME/.zprofile
shlomif[fcs]:$trunk/fc-solve/source$ which npm
/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/node/14.15.5_64bit/bin/npm
shlomif[fcs]:$trunk/fc-solve/source$ npm -v
6.14.11
shlomif[fcs]:$trunk/fc-solve/source$ /usr/bin/npm -v
8.3.1
shlomif[fcs]:$trunk/fc-solve/source$

@sbc100
Copy link
Collaborator

sbc100 commented May 17, 2022

When you activative emsdk it we put our own specific version of node (and npm) in your $PATH.

There have been some discussions of adding a way to avoid this. See #714 and #1142.

So the short answer is that this is working as indented, at least as of today. Do you have a specific problem with this behaviour?

@shlomif
Copy link
Contributor Author

shlomif commented May 17, 2022

@sbc100 : I'd like emsdk to provide a more recent version of npm.

@sbc100
Copy link
Collaborator

sbc100 commented May 17, 2022

Can you explain exactly why you need a newer version? Also, specifically do you need the newer version available at the same time as the emscripten tools. When emsdk tools are not active your own version should still be the one that is found in the PATH so I think the problem only exists when you want to use emsdk tools and your own version of npm/node?

@sbc100
Copy link
Collaborator

sbc100 commented May 17, 2022

I'm thinking of adding some kind of option to emsdk activate to avoid injecting our version of node into the path.. so hopefully that should solve your issue.

@shlomif
Copy link
Contributor Author

shlomif commented May 18, 2022

I'm thinking of adding some kind of option to emsdk activate to avoid injecting our version of node into the path.. so hopefully that should solve your issue.

👍 ; sounds good.

@shlomif
Copy link
Contributor Author

shlomif commented May 18, 2022

You can find a preliminary version of a patch for that here - https://paste.centos.org/view/2cf1d44e

shlomif added a commit to shlomif/emsdk that referenced this issue May 18, 2022
@shlomif
Copy link
Contributor Author

shlomif commented May 19, 2022

shlomif added a commit to shlomif/emsdk that referenced this issue Sep 19, 2022
shlomif added a commit to shlomif/emsdk that referenced this issue Dec 1, 2022
@sbc100
Copy link
Collaborator

sbc100 commented Dec 1, 2022

Can we close this in favor or #1142? They seems to the same right?

@sbc100 sbc100 closed this as completed Dec 1, 2022
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