volta icon indicating copy to clipboard operation
volta copied to clipboard

Volta/Nuxt problems between multiple user accounts?

Open codebycab opened this issue 1 year ago • 2 comments

This is probably a consequence of my lack of knowledge but, on my Windows machine I have two profiles (one work and one personal). I use Volta to manage my node. Nuxt projects build and run correctly in my work profile, but the same projects fail in my personal profile. The various paths relating to Volta are these:

  • The system path has C:\Program Files\Volta\
  • The personal profile's path has C:\Users\personalusername\AppData\Local\Volta\bin
  • The work profile's path has C:\Users\workusername\AppData\Local\Volta\bin

The only difference I can spot between the personal and work profile is that I use node 18 in the work profile, and node 20 in the personal profile.

Either way, on the personal profile Nuxt seems to be looking for Devtools in C:/Program Files/nodejs/node_modules/@nuxt/devtools/module.cjs but C:/Program Files/nodejs does not exist, generating the "Cannot find module" error.

I have not validated this problem with other frameworks/projects outside Nuxt.

Anyone has any idea about what's going on?

codebycab avatar Mar 30 '24 16:03 codebycab

Hi @MorningstarPhoenix, that's surprising! I don't have any insights into what Nuxt is doing internally, but if it works in one profile it should work in the other. What is the output of volta list all for the two profiles? It's possible that the Nuxt devtools are installed for one and not the other, which is causing it to fall back to searching the "default" locations for Node.

charlespierce avatar Apr 02 '24 04:04 charlespierce

Hi! Nuxt Devtools is not installed in neither profile... I have tried installing in the personal profile, but no dice.

Either way, running the command in the personal profile gives this output:

 User toolchain:

    Node runtimes:
        v20.9.0 (default)

    Package managers:


    Packages:
        [email protected] (default)
            binary tools: nuxi, nuxi-ng, nuxt, nuxt-cli
            platform:
                runtime: [email protected]
                package manager: npm@built-in

While running in the work profile returns this:

User toolchain:

    Node runtimes:
        v18.17.1 (default)

    Package managers:
        Yarn:
            v4.0.0 (default)

    Packages:
        @shopify/[email protected] (default)
            binary tools: shopify
            platform:
                runtime: [email protected]
                package manager: npm@built-in
        @shopify/[email protected] (default)
            binary tools:
            platform:
                runtime: [email protected]
                package manager: npm@built-in
        @vue/[email protected] (default)
            binary tools: vue
            platform:
                runtime: [email protected]
                package manager: npm@built-in
        @withgraphite/[email protected] (default)
            binary tools: graphite, gt
            platform:
                runtime: [email protected]
                package manager: npm@built-in
        [email protected] (default)
            binary tools: nuxi, nuxi-ng, nuxt, nuxt-cli
            platform:
                runtime: [email protected]
                package manager: npm@built-in
        [email protected] (default)
            binary tools:
            platform:
                runtime: [email protected]
                package manager: npm@built-in

There's a version mismatch with Nuxi but I don't think that's the problem, could it be?

While I have Yarn installed in the work profile only, I'm using npm as the package manager for the Nuxt project.

codebycab avatar Apr 03 '24 08:04 codebycab