fix: failed to install module via devtools - yarn
đ The bug
using vue 3.4.15, nuxt 3.10.1 and devtools 1.0.8 with a fresh install, i am unable to install modules via the devtools window, with the following error message:
RPC error on executing "installNuxtModule": Failed to install module, process exited with 1
running the commands manually in my terminal works fine.
To reproduce:
- create a new nuxt project:
npx nuxi@latest init test& selectyarn - start app with
yarn dev - pick any module & click install
- error occurs
warning [email protected]: The engine "vscode" appears to be invalid. 12:15:21 PM
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "vite@*".
warning "nuxt > @nuxt/devtools > @nuxt/[email protected]" has unmet peer dependency "vite@*".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0".
ERROR [nuxt-devtools] RPC error on executing "installNuxtModule": 12:15:21 PM
Failed to install module, process exited with 1
đ ī¸ To reproduce
https://stackblitz.com/edit/yarn-devtools-bug?file=%2Fhome%2Fprojects%2Ftest%2Fnuxt.config.ts
đ Expected behavior
Be able to install modules via devtools in yarn
âšī¸ Additional context
i tried installing modules using the other package managers as well. NPM failed with a different error, while pnpm worked fine.
I just ran into the same error using Nuxt 3.14.1592 and DevTools 1.6.3 when trying to install the ESLint Module (0.7.2) from the module window in DevTools. Installing manually using pnpm dlx nuxi module add eslint worked as expected.