wallabyjs / console-ninja

Repository for Console Ninja questions and issues
https://console-ninja.com
Other
382 stars 21 forks source link

[Bug]: Internal server error: Method Promise.prototype.then called on incompatible receiver 11937 #233

Closed xAlvzx closed 11 months ago

xAlvzx commented 11 months ago

What happened?

It doesn't allow starting the Vite server.

Visual Studio Code Version: 1.84.2-1 SO: archlinux Node version: v21.2.0

Version

v1.0.256

Steps to reproduce (or sample repo)

When starting the Vite server with the ninja console, the following error occurs:

[vite] Internal server error: Method Promise.prototype.then called on incompatible receiver 11937 at Number.then () at readFileHandle (node:internal/fs/promises:542:30) at async viteIndexHtmlMiddleware

Disabling it allows the server to run normally.

Log output

13:56:02.051 info buildHook-111550 installing build hook for vite at /home/pablo/Documents/GitHub/ser/SistemaBiblioteca, node v21.2.0
13:56:02.059 info buildHook-111550 allowed tools: vite, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
13:56:02.059 info buildHook-111550 running tools: vite
13:56:02.060 info buildHook-111550 installing fs interceptor
13:56:02.128 info buildHook-111550 allowed tools: vite, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
13:56:02.128 info buildHook-111550 running tools: vite
13:56:02.255 info buildHook-111550 file processed (stat): 0 log points, error handler: true
13:56:02.402 info buildHook-111550 file processed (stat): 0 log points, error handler: false
13:56:02.417 info buildHook-111550 file processed (stat): 2 log points, error handler: false
13:56:02.421 info buildHook-111550 file processed (stat): 0 log points, error handler: false
13:56:02.427 info buildHook-111550 file processed (stat): 0 log points, error handler: false
13:56:02.445 info buildHook-111550 file processed (stat): 1 log points, error handler: false
13:56:02.448 info buildHook-111550 file processed (stat): 0 log points, error handler: false
13:56:02.468 info buildHook-111550 file processed (stat): 2 log points, error handler: false
13:56:02.492 info buildHook-111550 file processed (stat): 2 log points, error handler: false
13:56:02.495 info buildHook-111550 file processed (stat): 0 log points, error handler: false
13:56:02.498 info buildHook-111550 file processed (stat): 1 log points, error handler: false
13:56:02.519 info buildHook-111550 file processed (stat): 2 log points, error handler: false
13:56:02.526 info buildHook-111550 file processed (stat): 1 log points, error handler: false
CodeWithShreyans commented 11 months ago

+1 This makes the extension unusable for the time being. Spent 2 days trying to find the source of this error. Can you rollback to a previous release till this is fixed?

ArtemGovorov commented 11 months ago

Can you rollback to a previous release till this is fixed?

The issue was not caused by any changes in the extension. It was a breaking change in node v21.2.0. The support for the mentioned version of node has been now added and is published in v1.0.257+ of the extension.