nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.93k stars 5.03k forks source link

No response returned from render handler [upgraded from RC.12 to 13] #15362

Closed Pamavoc closed 2 years ago

Pamavoc commented 2 years ago

Environment

Reproduction

I will edit this section with a template asap

Describe the bug

Just upgraded from RC.12 to RC.13, nothing changed in my repo. Was perfectly working with RC.12, but now I'm getting this white text with a grey background :

No response returned from render handler: /__nuxt_error?url=/&statusCode=500&statusMessage=Vite+Error&message=[vite-node]+[ERR_INVALID_URL_SCHEME]+/node_modules/ufo/dist/index.mjs&stack=%3Cpre%3E%3Cspan+class=%22stack+internal%22%3Eat+/node_modules/ufo/dist/index.mjs%3C/span%3E%3C/pre%3E&data

Additional context

Package.json

{ "private": true, "scripts": { "build": "nuxt build", "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview" }, "dependencies": { "@theatre/core": "^0.5.0", "@theatre/studio": "^0.5.0", "@vueuse/nuxt": "^9.3.1", "glslify": "^7.1.1", "gsap": "^3.11.3", "howler": "latest", "mitt": "^3.0.0", "nuxi": "^3.0.0-rc.13", "postprocessing": "^6.29.0", "three": "latest", "tweakpane": "latest", "vite-plugin-glsl": "^0.5.2" }, "devDependencies": { "@tweakpane/core": "latest", "@types/three": "latest", "sass": "^1.49.8" } }

Logs

Nuxi 3.0.0-rc.13                                                                                                                                  20:17:52
Nuxt 3.0.0-rc.13 with Nitro 0.6.1                                                                                                                 20:17:52
                                                                                                                                                  20:17:53
  > Local:    http://localhost:3000/ 

i Vite client warmed up in 3591ms                                                                                                                 20:17:59
√ Nitro built in 698 ms                                                                                                                     nitro 20:18:00
(node:1512) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
shtse8 commented 2 years ago

I have the same issue.

danielroe commented 2 years ago

Would you provide a reproduction? πŸ™

luabraggion commented 2 years ago

estou com o mesmo problema ao atualizar

No response returned from render handler: /__nuxt_error?url=/&statusCode=500&statusMessage=Vite+Error&message=[vite-node]+[ERR_INVALID_URL_SCHEME]+/node_modules/ufo/dist/index.mjs&stack=%3Cpre%3E%3Cspan+class=%22stack+internal%22%3Eat+/node_modules/ufo/dist/index.mjs%3C/span%3E%3C/pre%3E&data

fabrizioiacobucci commented 2 years ago

@danielroe I have the same issue but I have an empty app. I just ran "npx nuxi init fabrizio" -> "nuxi add page index" -> changed NuxtWelcome to NuxtPage in app.vue -> "npm run dev -- -o" and getting the error on any browser

EDIT: I was on Node 16.18.0 for Strapi compatibility. I then added v18.12.1 (latest LTS) and nothing changed

fabrizioiacobucci commented 2 years ago

@danielroe I solved it but not sure of the root cause. My root folder had 1 space in the name, I renamed it deleting the space. After this change VS Code asked again to Trust the Author and fodler content and also which browser to use when ran NPM RUN DEV. Not sure if it is related to any cached info in VS Code or something else.

shtse8 commented 2 years ago

Would you provide a reproduction? πŸ™

I tried my best to find the cause. but still no idea and don't know how to reproduce. no matter what I tried, after upgrading to rc13, the error exists.

danielroe commented 2 years ago

Likely related to https://github.com/nuxt/framework/pull/8673.

cc: @pi0.

actuallywitcher commented 2 years ago

Likely related to nuxt/framework#8673.

cc: @pi0.

@shtse8 , @Pamavoc @fabrizioiacobucci
It appears that the error arises from using JavaScript files instead of Typescript files in the Plugins directory. In my case, changing the plugin file to a Typescript file solved the problem for me.

shtse8 commented 2 years ago

Likely related to nuxt/framework#8673. cc: @pi0.

@shtse8 , @Pamavoc @fabrizioiacobucci It appears that the error arises from using JavaScript files instead of Typescript files in the Plugins directory. In my case, changing the plugin file to a Typescript file solved the problem for me.

But I don't have any JavaScript file in my project. All are typescripts. It was working in rc12 and rc13 nightly build (3.0.0-rc.13-27781436.1f6b3be), but not official release rc13.

No response returned from render handler: /__nuxt_error?url=/&statusCode=500&statusMessage=Vite+Error&message=[vite-node]+[MODULE_NOT_FOUND]+/__uno.css&stack=%3Cpre%3E%3Cspan+class=%22stack%22%3Eat+/__uno.css%3C/span%3E%3C/pre%3E&data
Pamavoc commented 2 years ago

Hi everyone, thanks for your answers.

The bug seems to be related to the path my project was in.

  1. I moved folder from D:\Gobelins\AnnΓ©e-4 to C:\Users\me\Desktop
  2. I removed node_modules folder and yarn.lock file
  3. I ran again yarn install
  4. I ran npx nuxi@latest upgrade --force

These steps fixed the bug for me. I suspect a problem with the part "AnnΓ©e-4". Maybe check the path where your project is located and see if there are any special characters / spaces.

phenomenal-hardy commented 2 years ago

any update on this? still having this same error after upgrading to rc13, cant make any of the posible solutions to get it working :(

MuhammadM1998 commented 2 years ago

I had the same problem after upgrading from rc12 to rc13, the problem was fixed after I removed the spaces from my project name. If this didn't work for you there could be spaces in a parent folder of your project.

phenomenal-hardy commented 2 years ago

I had the same problem after upgrading from rc12 to rc13, the problem was fixed after I removed the spaces from my project name. If this didn't work for you there could be spaces in a parent folder of your project.

Thank you very much, got it working, i had a space in a parent folder

this was my project path ( space in "software development" ) C:\Users\pheno\Documents\Software Development\Proyectos\ferreteria-nuxt-app

created a new project folder in desktop and got it working right away

AKreiker commented 2 years ago

I have neither spaces in the directory nor parent folder and I still get this error πŸ€”

shtse8 commented 2 years ago

I have neither spaces in the directory nor parent folder and I still get this error πŸ€”

Same here. My project path is D:\project\. The error still exists.

muhni97 commented 2 years ago

I had the same problem after upgrading from rc12 to rc13, the problem was fixed after I removed the spaces from my project name. If this didn't work for you there could be spaces in a parent folder of your project.

Thank you very much, got it working, i had a space in a parent folder

this was my project path ( space in "software development" ) C:\Users\pheno\Documents\Software Development\Proyectos\ferreteria-nuxt-app

created a new project folder in desktop and got it working right away

That's the whole thing. I moved my folder to the desktop and it's fixed

mittci commented 2 years ago

I had the same problem after upgrading from rc12 to rc13, the problem was fixed after I removed the spaces from my project name. If this didn't work for you there could be spaces in a parent folder of your project.

Thank you very much, got it working, i had a space in a parent folder this was my project path ( space in "software development" ) C:\Users\pheno\Documents\Software Development\Proyectos\ferreteria-nuxt-app created a new project folder in desktop and got it working right away

That's the whole thing. I moved my folder to the desktop and it's fixed

Dance with folder place :) sounds familiar, but my problem was need to run npm run nuxi clean when change dir.

shtse8 commented 2 years ago

Currently, it still can work with rc12, but not rc13. any progress on this issue?

mittci commented 2 years ago

rc 13 is the worst rc that I seen

@shtse8 Nuxt 3.0.0-rc.14-27796957.b60f136 work nice, but also it work is full of mysterious things

shtse8 commented 2 years ago

For Nuxt 3.0.0-rc.14-27799756.453ce78, I still get the same error.

No response returned from render handler: /__nuxt_error?url=/&statusCode=404&statusMessage=Cannot+find+any+route+matching+/.&message=Cannot+find+any+route+matching+/.&stack&data

PLUS.... even more...

 WARN  Failed to resolve dependency: vue-router, present in 'optimizeDeps.include'                                                                                                                                                                                                                         17:20:06

 ERROR  Failed to resolve import "vue-router" from "virtual:nuxt:D:\project\.nuxt\pages.mjs". Does the file exist? 

I have already removed all caches and built files, including .nuxt, node_modules, etc...

mittci commented 2 years ago

@shtse8 a ha ha ha, i don't have such troubles, i am more lucky

you have something with optimizeDeps.include in nuxt config? remove may be?

i play now with ssr, not spa or ssg

shtse8 commented 2 years ago

@shtse8 a ha ha ha, i don't have such troubles, i am more lucky

you have something with optimizeDeps.include in nuxt config? remove may be?

i play now with ssr, not spa or ssg

No, I don't have this setting, and even don't know what this setting is. Almost all settings are default. This is my first time to see this setting in an error. I don't play around manually with vue-router as I know nuxt handles all stuffs internally. I only can make it work by downgrading to rc12.

mittci commented 2 years ago

you have special character in root path (diacritics)?

manniL commented 2 years ago

I think there are multiple issues combined here:

TechieStephen commented 2 years ago

Well I have been able to work around this on my end. Like @Pamavoc suggested this seems to be caused by white space or special characters not just in the project name but also in the project directory and PC username.

For example my project was in C:\users\Techie Stephen\desktop\nuxt-app

This was what got it working:

Maginobion commented 2 years ago

I can confirm the error occurs if any folder it is included in has a space or special character

shtse8 commented 2 years ago

Well I have been able to work around this on my end. Like @Pamavoc suggested this seems to be caused by white space or special characters not just in the project name but also in the project directory and PC username.

For example my project was in C:\users\Techie Stephen\desktop\nuxt-app

This was what got it working:

  • move project to my c drive to C:\nuxt-app
  • delete node_modules and yarn.lock or package-lock.json file
  • run yarn install or npm install
  • run yarn dev or npm run dev

but my project doesn't include any space or special characters and even my pc username is just "kyle". nothing special. but it still shows the error.

shtse8 commented 2 years ago

After upgrading to Nuxi 3.0.0-rc.14-27801543.b4d7d62,

the error message changed to

image
danielroe commented 2 years ago

Would you open a new issue with a reproduction? πŸ™

shtse8 commented 2 years ago

x

Would you open a new issue with a reproduction? πŸ™

I am thinking if something in rc13 and rc14 breaks unocss in rc13 and rc14. I opened an issue there: https://github.com/unocss/unocss/issues/1869

yesworld commented 2 years ago

same problem :(

Reproducing:

pnpm dlx nuxi init nuxt-app

package.json

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "nuxt": "3.0.0-rc.13"
  }
}
pnpm install

pnpm run dev

Console:

image

I downgraded to version rc 9 and all is well.

pyncz commented 2 years ago

@yesworld It's related to nuxt/nuxt.js#14146, not this one. Check that issue.

Using nuxt with pnpm, you should install deps like this:

pnpm install --shamefully-hoist

OR create .npmrc file with shamefully-hoist=true inside before the install. OR add vue and ufo (and whatever you see in similar errors) in deps manually.

mittci commented 2 years ago

@yesworld It's related to nuxt/nuxt.js#14146, not this one. Check that issue.

Using nuxt with pnpm, you should install deps like this:

pnpm install --shamefully-hoist

OR add vue and ufo (and whatever you see in similar errors) in deps manually.

or use npm

yesworld commented 2 years ago

Try 1:

npm install
npm run dev

console:

image

browser:

image

Try 2: OR create .npmrc file with shamefully-hoist=true inside before the install. I still get the same error. :(

MaciekCelinski commented 2 years ago

Hi, if that would help anyone I did this:

inside of nuxt.config.ts i have added this line:

import { defineNuxtConfig } from 'nuxt';

then in pakage.json I have added:

  "overrides": {
    "nuxt": "3.0.0-rc.5",
    "nuxi": "3.0.0-rc.5",
    "@nuxt/vite-builder": "3.0.0-rc.5",
    "@nuxt/kit": "3.0.0-rc.5",
    "@nuxt/schema": "3.0.0-rc.5"
  }

after this "npm run dev" worked correctly

mittci commented 2 years ago

as I say, it work well for me with nuxt@3.0.0-rc.14-27799761.3839dba rc.5 is too old, it have bugs that not permitted me to use some modules

nathannye commented 2 years ago

Solved my issue with renaming every folder in the path. D:\Dev\Projects\ProjectName. ProjectName originally had a space (Project Name).

Szymon-dziewonski commented 2 years ago

@pyncz Thank you very much for your reply, I spent so much time trying to figure it out, on yarn it works, but with pnpm it does not. shamefully-hoist=true is fixing issue, for me personally it shows how bad Nuxt is compare to other frameworks like Next etc, with Nuxt there are always problems with it :/

danielroe commented 2 years ago

@Szymon-dziewonski You can track https://github.com/nuxt/nuxt.js/issues/14146 - we do not support pnpm without --shamefully-hoist at the moment, but it's coming very soon.

spokik commented 1 year ago

@danielroe I solved it but not sure of the root cause. My root folder had 1 space in the name, I renamed it deleting the space. After this change VS Code asked again to Trust the Author and fodler content and also which browser to use when ran NPM RUN DEV. Not sure if it is related to any cached info in VS Code or something else.

Thanks! Removing a space from the directory helped me

devmnj commented 1 year ago

No spaces allowed in root πŸ“‚

crunchwrap89 commented 1 year ago

I also had the same issue when upgrading from RC 12 to 3.0.0 stable. Changing my rootfolder path in C://code/wg projects/myapp/ to C://code/wg-projects/myapp/ solved the issue. No need to reinstall / clean inbetween.

I dont think this ticket should be closed ? Since issue still persists. Is there a separate ticket for it?

danielroe commented 1 year ago

yes, the issue is linked above.

Szymon-dziewonski commented 1 year ago

@Szymon-dziewonski You can track nuxt/nuxt.js#14146 - we do not support pnpm without --shamefully-hoist at the moment, but it's coming very soon.

Thank already doing it, appreciate info :)

Vasejke commented 1 year ago

Well I have been able to work around this on my end. Like @Pamavoc suggested this seems to be caused by white space or special characters not just in the project name but also in the project directory and PC username.

For example my project was in C:\users\Techie Stephen\desktop\nuxt-app

This was what got it working:

  • move project to my c drive to C:\nuxt-app
  • delete node_modules and yarn.lock or package-lock.json file
  • run yarn install or npm install
  • run yarn dev or npm run dev

Thank you, in my case it helped. I don't know what the error was related to, I just recreated the project on disk C and the error disappeared. The error was - 500 [vite-node] [ERR_INVALID_URL_SCHEME] /node_modules/ufo/dist/index.mjs.

manniL commented 1 year ago

Yes, see https://github.com/nuxt/nuxt.js/issues/15492