Skip to content

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

@cbroult

Description

@cbroult

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions