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

make install may cause conflict with NodeJS's node #3125

Closed
Tracked by #4619
mikedotexe opened this issue Oct 24, 2022 · 11 comments · Fixed by #4847
Closed
Tracked by #4619

make install may cause conflict with NodeJS's node #3125

mikedotexe opened this issue Oct 24, 2022 · 11 comments · Fixed by #4847

Comments

@mikedotexe
Copy link

mikedotexe commented Oct 24, 2022

System information

Osmosis version: Osmosis version
OS & Version: Mac M1 Monterey 12.6 as well as Macbook Pro with Catalina 10.15.7
Commit hash: tagged at 11.0.1 and 12.2.0

Expected behaviour

That my typical experience on my terminal will not be affected by installation of osmosisd.

Actual behaviour

There seems to be a clash with a Golang binary that's thrown into:

~/go/bin/node

Screen Shot 2022-10-24 at 10 50 21 AM

and

Screen Shot 2022-10-24 at 10 57 27 AM

Steps to reproduce the behaviour

Install the node version manager (nvm): https://github.com/nvm-sh/nvm#installing-and-updating

Follow directions here:
https://docs.osmosis.zone/osmosis-core/build#build-osmosis

Text version of the logs:

panic: data-dir is required

goroutine 1 [running]:
main.main()
	github.com/osmosis-labs/osmosis/v12/tests/e2e/initialization/node/main.go:47 +0x6b8
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v18.3.0` to unset it.
panic: data-dir is required

goroutine 1 [running]:
main.main()
	github.com/osmosis-labs/osmosis/v12/tests/e2e/initialization/node/main.go:47 +0x6b8

It seems like it might be the end-to-end testing, which is mentioned in this Makefile:

osmosis/Makefile

Lines 301 to 302 in 805f80c

docker-build-e2e-init-node:
@DOCKER_BUILDKIT=1 docker build -t osmosis-e2e-init-node:debug --build-arg E2E_SCRIPT_NAME=node -f tests/e2e/initialization/init.Dockerfile .


Perhaps I am at fault for my $PATH having the golang binaries before the NodeJs/nvm ones, but thought I would report since I am seeing this on two of my machines, the newer one starting from scratch (not using Time Machine backups or whatever) so I probably won't be the last person to face this issue.

Overall, I'd say it might not a good move to have any binary called node and perhaps that could be renamed to e2e-node or something.

@czarcas7ic
Copy link
Member

tagging @niccoloraspa who has most context with docker files

@niccoloraspa niccoloraspa self-assigned this Oct 25, 2022
@niccoloraspa
Copy link
Member

niccoloraspa commented Oct 26, 2022

Thanks for the issue and the detailed explanation.
As you pointed out it is a name conflict due to a not-so-ideal name choice on our side.

Working on a fix.

@ValarDragon
Copy link
Member

I'm confused as to why anything for e2e is getting built with make install

@ValarDragon
Copy link
Member

Just checking in, did we figure this one out @niccoloraspa

(Both why make build did this, and getting things renamed)

@alagiz
Copy link

alagiz commented Dec 23, 2022

having the same issue, any update?

@5iddy
Copy link

5iddy commented Jan 30, 2023

I have experienced this issue too. Confused the hell out of me. I have experienced it while setting up neovim-treesitter.
Error That I encountered

@mdyring
Copy link

mdyring commented Jan 31, 2023

Bumping into this as well. Also experienced this after doing a make install on latest release tag.

This looks like the source of the issue, but not sure I understand why e2e test binaries are being built for make install.

@DOCKER_BUILDKIT=1 docker build -t osmosis-e2e-init-node:debug --build-arg E2E_SCRIPT_NAME=node --platform=linux/x86_64 -f tests/e2e/initialization/init.Dockerfile .

@migueldingli1997
Copy link
Contributor

Also ran into this issue and it confused me quite a bit as well.

@czarcas7ic
Copy link
Member

@niccoloraspa Are we able to triage this?

@czarcas7ic
Copy link
Member

czarcas7ic commented Mar 28, 2023

On our chain backlog call, @p0mvn stated that there is an E2E script named "node", and we just have to rename it to solve this name clash issue.

@niccoloraspa
Copy link
Member

I can tackle this issue during this sprint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants