8000 yarn installed rvm-windows fails with missing AppData\Local\Yarn\bin\rvm.ps1 whereas npm based installation works · Issue #5 · magynhard/rvm-windows · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yarn installed rvm-windows fails with missing AppData\Local\Yarn\bin\rvm.ps1 whereas npm based installation works #5

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

Closed
cbroult opened this issue Jan 1, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@cbroult
Copy link
cbroult commented Jan 1, 2025

While following the installation procedure https://github.com/magynhard/rvm-windows?tab=readme-ov-file#installation

I selected the use of yarn and got the following error:

rvm list known
C:\Users\cbrou\AppData\Local\Yarn\Data\global\node_modules\rvm-windows\src\cli\tasks\_init.js:132
            throw new Error(`Could not find file '${file}'`);
            ^

Error: Could not find file 'C:\Users\cbrou\AppData\Local\Yarn\bin\rvm.ps1'
    at RvmCliInit._writeToSecondLine (C:\Users\cbrou\AppData\Local\Yarn\Data\global\node_modules\rvm-windows\src\cli\tasks\_init.js:132:19)
    at RvmCliInit.initSessionToRvmExes (C:\Users\cbrou\AppData\Local\Yarn\Data\global\node_modules\rvm-windows\src\cli\tasks\_init.js:82:18)
    at Object.<anonymous> (C:\Users\cbrou\AppData\Local\Yarn\Data\global\node_modules\rvm-windows\src\cli\cli.js:24:12)
    at Module._compile (node:internal/modules/cjs/loader:1740:14)
    at Object..js (node:internal/modules/cjs/loader:1905:10)
    at Module.load (node:internal/modules/cjs/loader:1474:32)
    at Function._load (node:internal/modules/cjs/loader:1286:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:234:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:151:5)

Node.js v23.5.0
PS C:\Users\cbrou> 

Switching to the npm based installation, I was able to successfully install ruby 3.4.1.

PS C:\Users\cbrou> npm -v
10.9.2
PS C:\Users\cbrou> node -v
v23.5.0
PS C:\Users\cbrou> yarn -v
1.22.22
PS C:\Users\cbrou> rvm -v
rvm-windows 1.0.0
PS C:\Users\cbrou> rvm list
=* ruby-3.4.1

# => - current
# =* - current && default
#  * - default
PS C:\Users\cbrou>

What should I do to understand what I am doing wrong?

@magynhard magynhard added the bug Something isn't working label Jan 30, 2025
@magynhard
Copy link
Owner

Hi @cbroult , thank you for your feedback.

I will check this soon and try to reproduce.

@cbroult
Copy link
Author
cbroult commented Jan 30, 2025

I am happy to try it again if you need support to reproduce it or confirm it as a user error on my side.

@magynhard
Copy link
Owner

I digged in deeper.

Yarn does not create PowerShell files for global installs on its own. As I do not use PowerShell at all, i missed to test this case again with yarn.

I tried to find to make yarn compatible.

So i added a post install script for yarn, doing so manually by using a template from npm.
But then i figured out, that yarn and npm have very different behaviours of character encodings / charsets which cause errors on paths using special characters. They are not compatible and i would need to create and handle different encodings for npm and yarn.

So i decided to officially cancel installation support for yarn, as this might need too much special maintenance.

Thank you very much for your feedback to figure out this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0