Upgrade issues from v6 to v7 #5051
Replies: 5 comments
-
|
Bug: @adonisjs/inertia@4.0.0 crashes in dev mode if a previous build left a Vite manifest on disk What I was doing: Upgraded from v6 to v7 following the upgrade guide. After running node ace build to verify the build works, I ran node ace serve --hmr to start the dev server. The error: Every Inertia page request returns 500. It checks So if a previous Suggested fix in @adonisjs/inertia: The condition should also check Workaround: Delete the Vite manifest before starting dev mode. I added this to my dev script: Environment:
This is a reproducible bug in |
Beta Was this translation helpful? Give feedback.
-
|
While exploring the AdonisJS v7 documentation, I found several broken links, incorrect redirects, and 404 pages. Below is a grouped list of affected documentation pages and the expected correct destinations. Doc Linkhttps://docs.adonisjs.com/guides/database/lucid The following links are broken or redirect incorrectly:
Doc Linkhttps://docs.adonisjs.com/guides/frontend/api-client
Doc Linkhttps://docs.adonisjs.com/guides/database/redis
Doc Linkhttps://docs.adonisjs.com/guides/auth/introduction
Doc Linkhttps://docs.adonisjs.com/guides/auth/verifying-user-credentials
Doc Linkhttps://docs.adonisjs.com/guides/auth/session-guard
Doc Linkhttps://docs.adonisjs.com/guides/auth/access-tokens-guard
Note: |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if relevant, but: What you were doing (which step in the upgrade)Upgrading some packages. The error message or unexpected behaviorSolution is to replace Your Node.js version
Which packages you've updated so farCurrently updating mine, which depends on some adonis-ish ecosystem. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I have just completed the migration guide to v7, but I am encountering a strange error when I try to build or dev the application. Has anyone seen something like this before, or know a possible solution?
thread '<unnamed>' panicked at /Users/runner/work/swc/swc/crates/swc_ecma_transforms_module/src/path.rs:123:13:
base_dir(`..`) must be absolute. Please ensure that `jsc.baseUrl` is specified correctly. This cannot be deduced by SWC itself because SWC is a transpiler and it does not try to resolve project details. In other words, SWC does not know which directory should be used as a base directory. It can be deduced if `.swcrc` is used, but if not, there are many candidates. e.g. the directory containing `package.json`, or the current working directory. Because of that, the caller (typically the developer of the JavaScript package) should specify it. If you see this error, please report an issue to the package author.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceNode version: 24.12.0 Package versions: {
"dependencies": {
"@adonisjs/ally": "^6.0.0",
"@adonisjs/auth": "^10.0.0",
"@adonisjs/core": "^7.0.1",
"@adonisjs/cors": "^3.0.0",
"@adonisjs/session": "^8.0.0",
"@adonisjs/static": "^2.0.0",
"@tuyau/core": "^1.1.0",
"@tuyau/superjson": "^1.0.0",
"@vinejs/vine": "^4.3.0",
"argon2": "^0.44.0",
"reflect-metadata": "^0.2.2",
},
"devDependencies": {
"@adonisjs/assembler": "^8.0.0",
"@adonisjs/tsconfig": "^2.0.0",
"@japa/api-client": "^3.2.1",
"@japa/assert": "^4.2.0",
"@japa/plugin-adonisjs": "^5.1.0",
"@japa/runner": "^5.3.0",
"@poppinss/ts-exec": "^1.4.4",
"@tuyau/utils": "^0.0.9",
"hot-hook": "^1.0.0",
"pino-pretty": "^13.1.3",
"youch": "^4.1.0"
}
}I am running a monorepo setup with NextJS as the frontend and using Tuyau. I have compared my code to what the create-adonisjs cli does, and I cannot seem to find what could be the problem. Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
|
Congrats on v7 release! One issue I hit was missing adding the
Which makes it sound like it's available out of the box. Related issue I saw here: #5060 Figured it out pretty quickly but seemed like maybe it was overlooked in the upgrade guide. Related to that, it seems that if you're using the default implementation of export default class PostsController {
async show({ params, serialize }: HttpContext) {
const post = await Post.find(params.id)
return serialize(PostTransformer.transform(post))
}
}const post = await client.api.posts.show({ params: { id: '1' } })
// post.title is string
// post.author.name is string
// Full autocomplete and type safetyvs. const { data: post } = await client.api.posts.show({ params: { id: '1' } })
// post.title is string
// post.author.name is string
// Full autocomplete and type safety |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
If you're upgrading from v6 to v7 and run into something unexpected, this is the place to ask.
Before posting, check the upgrade guide: https://docs.adonisjs.com/v6-to-v7
It covers all breaking changes and step-by-step instructions. Most apps should upgrade in under an hour.
When sharing an issue, it helps to include:
I'll be monitoring this thread and updating the upgrade guide if anything comes up that isn't covered.
Beta Was this translation helpful? Give feedback.
All reactions