adonisjs / inertia

Official Inertia.js adapter for AdonisJS
MIT License
74 stars 9 forks source link

Error : Cannot resolve binding \"vite\" from the container #8

Closed shankiflang closed 6 months ago

shankiflang commented 6 months ago

Package version

"@adonisjs/inertia": "^1.0.0-18"

Describe the bug

Hello, I tried to follow the article (https://adonisjs.com/blog/experimental-release-for-inertia) to add inertia to an existing project and I get this error:

[17:11:31.722] ERROR (1120): Cannot resolve binding "vite" from the container
    request_id: "afh501ia8xdjqpml0fb32s7p"
    x-request-id: "afh501ia8xdjqpml0fb32s7p"
    err: {
      "type": "RuntimeException",
      "message": "Cannot resolve binding \"vite\" from the container",
      "stack":
          RuntimeException: Cannot resolve binding "vite" from the container
              at createError (C:\devs\node_modules\.pnpm\@adonisjs+fold@10.0.1\node_modules\@adonisjs\fold\src\resolver.ts:246:46)
              at resolveFor (C:\devs\node_modules\.pnpm\@adonisjs+fold@10.0.1\node_modules\@adonisjs\fold\src\resolver.ts:404:11)
              at make (C:\devs\node_modules\.pnpm\@adonisjs+fold@10.0.1\node_modules\@adonisjs\fold\src\resolver.ts:443:17)
              at make (C:\devs\node_modules\.pnpm\@adonisjs+fold@10.0.1\node_modules\@adonisjs\fold\src\container.ts:191:34)
              at file:///C:/devs/node_modules/.pnpm/@adonisjs+inertia@1.0.0-18_@adonisjs+core@6.3.1_@adonisjs+session@7.1.1_@adonisjs+vite@3.0.0-_m553ty72nql5b3i5zgzf2n3kym/node_modules/@adonisjs/inertia/build/providers/inertia_provider.js:30:45
      "name": "RuntimeException",
      "status": 500,
      "code": "E_RUNTIME_EXCEPTION"
    }

I created a new project from scratch and it works. I don't know what I did wrong 😕

Reproduction repo

No repo, as this is a company project.

Julien-R44 commented 6 months ago

probably missing the vite provider in your adonisrc file ?

Julien-R44 commented 6 months ago

also please use github discussions or discord for questions that are not bug or feature requests