question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot start nuxt: Cannot find module '@nuxt/vite-builder'

See original GitHub issue

Environment


  • Operating System: Linux
  • Node Version: v17.9.0
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: npm@8.5.5
  • Builder: vite
  • User Config: modules, vite, build, css, typescript, runtimeConfig
  • Runtime Modules: @nuxtjs/supabase@0.1.14
  • Build Modules: -

Reproduction

Dev branch of https://github.com/WorkEvent/website/tree/dev

Cloning, installing and running the project should give the error.

You can also check it out on https://stackblitz.com/github/WorkEvent/website/tree/dev?file=README.md

Describe the bug

When trying to run the project through nuxi dev, I get an error about @nuxt/vite-builder being missing.

Additional context

Was on version 3.0.0-rc.1 and upgraded, cannot start the project since.

I already tried to remove my node_modules, package-lock and installing again. The error is even reproductible from cloud instances like stackblitz. I also tried doing the same on multiple devices and couldn’t get the project to run.

Logs

ERROR  Cannot start nuxt:  Cannot find module '@nuxt/vite-builder'
Require stack:
- /home/colin/projects/univ/work-event/website/index.js

  Require stack:
  - index.js
  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
  at Function.resolve (node:internal/modules/cjs/helpers:108:19)
  at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:192841)
  at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:242:29)
  at importModule (node_modules/@nuxt/kit/dist/index.mjs:265:24)
  at bundle (node_modules/nuxt/dist/index.mjs:1675:82)
  at build (node_modules/nuxt/dist/index.mjs:1650:11)
  at async Promise.all (index 1)
  at async load (node_modules/nuxi/dist/chunks/dev.mjs:6736:9)
  at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6777:5)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
ColinEspinascommented, May 27, 2022

Just got it to work. Hurray!

Steps I did:

# Clear current deps just in case
> rm -rf node_modules
> rm package-lock.json
> rm -rf .nuxt
> npm cache clear -f

# Install packages with the --legacy-peer-deps option
> npm i --legacy-peer-deps
> npm run dev

# Have fun!

Thanks for the help, have a great day.

7reactions
mgd216commented, Jun 7, 2022

Unfortunately the solutions above did not work for me. However I ran:

npm i -D @nuxt/vite-builder --force
npm run dev
Read more comments on GitHub >

github_iconTop Results From Across the Web

@nuxt/vite-builder - npm
Start using @nuxt/vite-builder in your project by running `npm i @nuxt/vite-builder`. There are 4 other projects in the npm registry using ...
Read more >
How to resolve Cannot import module '@nuxt/builder'?
In my case, I removed package-lock.json and node_modules, then re-run. npm install. npm run build.
Read more >
@nuxt/vite-builder | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Intro - Nuxt
Using native ES modules, it provides instant server start and lightning fast HMR development experience. This package allows using Vite instead of Webpack ......
Read more >
Slice Simulator Nuxt 3 - Developing with Prismic
Hello, I am trying to setup with Prismic 3 and Nuxt 3 version, and get this error: We can't connect to the simulator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found