wallabyjs / console-ninja

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

[Bug]: React App with Vite and Bun #307

Closed leosilberg closed 3 months ago

leosilberg commented 3 months ago

What happened?

No logs are appearing

Screenshot 2024-06-09 125821

Version

v1.0.323

CLI command to start your dev tool

bun run dev

Steps to reproduce (or sample repo)

package.json

{
  "name": "reactapp",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "bunx --bun vite",
    "build": "vite build",
    "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@types/react": "^18.2.66",
    "@types/react-dom": "^18.2.22",
    "@vitejs/plugin-react": "^4.2.1",
    "eslint": "^8.57.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.4.6",
    "vite": "^5.2.0"
  }
}

index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + React</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.jsx"></script>
  </body>
</html>

Log output

12:45:58.764 info extension stopping host
12:45:59.378 info host ------------ starting ------------
12:45:59.431 info extension host process output: port:[55405]
12:45:59.431 info extension 
12:45:59.619 info host client connected: extension { address: '127.0.0.1', family: 'IPv4', port: 55405 }
12:45:59.744 info host starting tools discovery and integration
12:45:59.756 info host looking for tools to patch
12:45:59.784 info host worker Starting Host Worker...
12:45:59.856 info host found 2 tool file(s) to patch
12:45:59.858 info host patching c:\Users\...\.vscode\extensions\ms-vscode.live-server-0.4.13\out\extension.js
12:45:59.859 info host patching c:\users\...\ReactApp\node_modules\vite\bin\vite.js
12:45:59.860 info host client connected: runtimeHook { address: '127.0.0.1', family: 'IPv4', port: 55405 }
12:45:59.863 info host Host's startup and patch time: 1097 ms
12:45:59.864 info host completed tools discovery and integration
12:46:00.408 info host client connected: runtimeHook { address: '127.0.0.1', family: 'IPv4', port: 55405 }
12:46:24.870 info buildHook-15308 installing build hook for vite at c:\users\...\reactapp, bun 1.1.12
12:46:24.908 info buildHook-15308 allowed tools: vite, angular, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-preview-extension, node
12:46:24.909 info buildHook-15308 running tools: vite
12:46:25.134 info host client connected: buildHook { address: '127.0.0.1', family: 'IPv4', port: 55405 }
12:46:25.155 info buildHook-15308 allowed tools: vite, angular, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-preview-extension, node
12:46:25.155 info buildHook-15308 running tools: vite
12:46:25.342 info buildHook-15308 file processed (stat): 0 log points, error handler: true, network logging handler: true
12:46:25.390 info buildHook-15308 file processed (stat): 1 log points, error handler: false, network logging handler: false
12:46:25.417 info buildHook-15308 file processed (stat): 2 log points, error handler: false, network logging handler: false
12:46:25.425 info buildHook-15308 file processed (stat): 0 log points, error handler: false, network logging handler: false
12:46:30.241 info host client disconnected: runtimeHook 1001
12:46:30.242 info host client disconnected: runtimeHook
12:46:30.243 info host client disconnected: runtimeHook 1001
12:46:30.244 info host client disconnected: runtimeHook
12:46:30.342 info host client connected: runtimeHook { address: '127.0.0.1', family: 'IPv4', port: 55405 }
12:46:30.460 info host client connected: runtimeHook { address: '127.0.0.1', family: 'IPv4', port: 55405 }
smcenlly commented 3 months ago

Your log seems to indicate that you haven't opened the browser (or if the browser was already opened before Ninja started, you haven't refreshed).

Can you please try opening the browser and then confirm that logs are displayed?

If you already had the browser opened and it's not working for you, can you please inspect your browser's dev tools? It may have an error that will indicate why it's not working for you.

You may also like to try a different browser to see if that fixes your problem.

leosilberg commented 3 months ago

This is the console in the browser

Screenshot 2024-06-10 093113

NikGovorov commented 3 months ago

Thank you for reporting the issue. It has been resolved and the fix is included in version 1.0.324.

leosilberg commented 3 months ago

Now it's working normally

Thanks for this great tool and quick fixes