Skip to content

npm create nuxt@latest fails to load modules when pnpm is not installedΒ #1342

Description

@BinarySpike

Following these instructions: https://nuxt.com/docs/4.x/getting-started/installation

When using the ui template, npm package manager, and installing the modules @vueuse/nuxt, @nuxtjs/seo, and @nuxtjs/tailwindcss I get a module install error β–  Error: spawn pnpm ENOENT

After installing corepack, enabling pnpm, running the creation successfully, then removing the project, disabling pnpm, and running the creation a second time, it works successfully.

Strangely it seems to find/use pnpm even after I corepack disable pnpm and even do a corepack cache clear. I cannot reproduce the error because it keeps using pnpm...🀷

This is the console output:

Which template would you like to use?
β”‚  ui – App using Nuxt UI
β”‚
β—‡  Creating project in website
β”‚
β—‡  Downloaded ui template
β”‚
β—‡  Which package manager would you like to use?
β”‚  npm
β”‚
β—‡  Initialize git repository?
β”‚  No
β”‚
β—‡  Dependencies installed
β”‚
β—‡  Would you like to browse and install modules?
β”‚  Yes
β”‚
β—‡  Modules loaded
β”‚
β”‚
β”‚
β—‡  Search and select modules:
β”‚  3 items selected
β”‚
●  Resolved @vueuse/nuxt, @nuxtjs/tailwindcss, @nuxtjs/seo, adding modules...
β”‚
●  Installing @vueuse/nuxt@14.3.0, @nuxtjs/tailwindcss@6.14.0, @nuxtjs/seo@5.3.0 as dependencies
β”‚
β–   Error: spawn pnpm ENOENT
β”‚
β—‡  Install failed for @vueuse/nuxt@14.3.0, @nuxtjs/tailwindcss@6.14.0, @nuxtjs/seo@5.3.0. Do you want to continue adding the modules to nuxt.config?
β”‚  Yes
β”‚
●  Adding @vueuse/nuxt to the modules
β”‚
●  Adding @nuxtjs/tailwindcss to the modules
β”‚
●  Adding @nuxtjs/seo to the modules
file:///home/nathan/code/presently/node_modules/@nuxt/kit/dist/index.mjs:701
        throw new TypeError(`Could not load \`${nuxtModule}\`. Is it installed?`);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions