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

Node: Error when installing via yarn #2680

Closed
BogdanGale opened this issue Nov 13, 2024 · 10 comments
Closed

Node: Error when installing via yarn #2680

BogdanGale opened this issue Nov 13, 2024 · 10 comments
Assignees
Labels
bug Something isn't working node Node.js wrapper Users Pain An issue known to cause users pain, generaly open by the user.
Milestone

Comments

@BogdanGale
Copy link

BogdanGale commented Nov 13, 2024

Describe the bug

Yarn throws an error when trying to install the valkey-glide package
error Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.

Expected Behavior

Package can be installed with yarn

Current Behavior

When installing the package via yarn the following error is thrown:

error Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
    at MessageError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:721:66)
    at new MessageError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:750:123)
    at FileResolver.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:50037:15)
    at Generator.next (<anonymous>)
    at step (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:310:30)
    at /opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:321:13
Error: Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
    at MessageError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:721:66)
    at new MessageError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:750:123)
    at FileResolver.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:50037:15)
    at Generator.next (<anonymous>)
    at step (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:310:30)
    at /opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:321:13
Error: Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
    at MessageError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:721:66)
    at new MessageError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:750:123)
    at FileResolver.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:50037:15)
    at Generator.next (<anonymous>)
    at step (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:310:30)
    at /opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:321:13
Error: Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
    at MessageError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:721:66)
    at new MessageError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:750:123)
    at FileResolver.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:50037:15)
    at Generator.next (<anonymous>)
    at step (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:310:30)
    at /opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:321:13
Error: Package "glide-rs" refers to a non-existing file '"/Users/user/Projects/example-project/rust-client"'.
    at MessageError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:721:66)
    at new MessageError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:750:123)
    at FileResolver.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:50037:15)
    at Generator.next (<anonymous>)
    at step (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:310:30)
    at /opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:321:13

Reproduction Steps

Run command yarn add @valkey/valkey-glide

Possible Solution

No response

Additional Information/Context

Yarn version: v1.22.22
Node version: v22.11.0

Client version used

1.1.0

Engine type and version

Redis 7.0.7

OS

MacOS

Language

TypeScript

Language Version

4.9.5

Cluster information

No response

Logs

No response

Other information

No response

@BogdanGale BogdanGale added the bug Something isn't working label Nov 13, 2024
@asafpamzn
Copy link
Collaborator

Thanks for reaching out, sorry for the late response, we are checking the issue.
Have you tried npm as temp workaround?

@BogdanGale
Copy link
Author

Hey @asafpamzn, thank you for replying!
Yes, npm works just fine

@Muhammad-awawdi-amazon
Copy link
Collaborator

Hey @BogdanGale
since npm works at the moment, can you work with that temporarily?
If not, I have another temporary solution for you that would work with Yarn until I fix the root cause.
Let me know what you prefer

@BogdanGale
Copy link
Author

If you have a workaround for yarn that would be lovely and greatly appreciated, since it wouldn't require me to change all the CI/CD pipelines from yarn to npm

@avifenesh avifenesh added Users Pain An issue known to cause users pain, generaly open by the user. node Node.js wrapper labels Nov 20, 2024
@avifenesh
Copy link
Member

avifenesh commented Nov 20, 2024

@BogdanGale
The issue seems to be that, for some reason, when yarn sees that in packag.json of glide, there's the dependency on a file in the glide directory, it's trying to pull it from the directory of the project itself (/Users/user/Projects/example-project).
We are looking into it, hopefully to find a solution or at least a temporary way to work around it.

Apparently yarn and npm using same names for completely different concepts.
What npm do with file: is equivalent to yarn portal.

If you want to share the structure of your CI, I might be able to give a faster solution.
If the repo is open, you can just refer me to there, ill find my way around.

For example, using npm for glide, and yalc to make it available in the yarn env is a temporary solution, or its anyhow require changes in the CI?

Thanks for the patience!

@BogdanGale
Copy link
Author

Thank you @avifenesh !

Don't worry, it's not so much about how to make the changes in the CI, it's just more the inconvenience that of losing the consistency with the CI pipelines in other services/applications that we have in our team.

I'll gladly wait until you guys look into it and also please let me know if I could help in any way.

Cheers!

@avifenesh
Copy link
Member

avifenesh commented Nov 22, 2024

@BogdanGale I'm still looking into it to find a better solution, but it appears that it might require a wider change in our published packages structure.
If this is the case, the fix will take some time to be released since it's a major structure difference, and even if solved fast, we will not release until making sure no regression occurs.

I will let you know if something else is pops during research, but maybe you better temporary use npm specifically for glide for a short while.

Possible solution meanwhile to use npm just for glide would be -

npm install @valkey/valkey-glide
cp -r node_modules/@valkey/valkey-glide-linux-arm64/rust-client ./  #note that its depends on your host type
rm -r package-lock.json node_modules
yarn add @valkey/valkey-glide

Iv'e tested it, and it’s doing the job.

It will be solved eventually, there's no question we want to support yarn users, and it has a high priority.

@jbrinkman
Copy link
Collaborator

Discussed with @avifenesh and agreed that best path forward is to refactor the solution to reference glide-rs as a separate external package which will resolve the Yarn issues and provide a more maintainable architecture.

@asafpamzn asafpamzn added this to the 1.3 milestone Dec 25, 2024
@Muhammad-awawdi-amazon
Copy link
Collaborator

Muhammad-awawdi-amazon commented Jan 1, 2025

Giving it an estimation of 2 weeks of full time work

@avifenesh
Copy link
Member

Putting all the issues which are relevant to the restructuring under the latest issue on the topic and closing them.
#3195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node Node.js wrapper Users Pain An issue known to cause users pain, generaly open by the user.
Projects
Status: Done
Development

No branches or pull requests

6 participants