Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt preview cannot start on a brand new Nuxt 3 project #1225

Closed
theolavaux opened this issue Apr 22, 2022 · 5 comments
Closed

Nuxt preview cannot start on a brand new Nuxt 3 project #1225

theolavaux opened this issue Apr 22, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@theolavaux
Copy link

I just bootstraped a NuxtJS project using the newly released RC (nuxt@3.0.0-rc.1) and tried to preview it with Volar. I get this error in the terminal.

CleanShot 2022-04-22 at 14 46 27@2x

@altryne
Copy link

altryne commented Apr 22, 2022

Quick look, the path changed from nuxt3 to just nuxt in the RC.
Running ln -s nuxt nuxt3 in your node_modules fixes this tempo until Volar extension updates to the latest

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Apr 23, 2022
@yaegassy
Copy link
Collaborator

I tried nuxt@3.0.0-rc.1. volar v0.34.10, but there still seems to be an error. Error: Cannot find module 'nuxi/cli'.

...snip

nuxt-app$ node "/Users/yaegassy/.vscode/extensions/johnsoncodehk.volar-0.34.10-darwin-arm64/dist/preview-bin/nuxi.js" dev --port 3333
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'nuxi/cli'
Require stack:
- /Users/yaegassy/.vscode/extensions/johnsoncodehk.volar-0.34.10-darwin-arm64/dist/preview-bin/nuxi.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at Object.<anonymous> (/Users/yaegassy/.vscode/extensions/johnsoncodehk.volar-0.34.10-darwin-arm64/dist/preview-bin/nuxi.js:8:29)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/yaegassy/.vscode/extensions/johnsoncodehk.volar-0.34.10-darwin-arm64/dist/preview-bin/nuxi.js'
  ]
}

...snip

@theolavaux
Copy link
Author

The problem has been solved for me, how did you bootstrap the project?

@yaegassy
Copy link
Collaborator

I see. If some of you are working correctly, it may be my environmental problem.

@yaegassy
Copy link
Collaborator

I seem to get an error when using pnpm install. npm install or yarn install works fine, so I'll use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants