752 questions
0
votes
0
answers
31
views
How to correctly set up Pinia with Inertia.js SSR in AdonisJS 6? Getting "getActivePinia() was called but there was no active Pinia"
I am building an application using AdonisJS 6, Vue 3, and Inertia.js. I'm trying to integrate Pinia for state management, but I'm running into an error:
I read online and see other issues here, but I ...
0
votes
0
answers
52
views
How to handle properly a PostGIS column with Lucid ORM?
I'm building an API using AdonisJS 6, Lucid ORM, knex-postgis, PostgreSQL and PostGIS. I have a posts table that includes a coordinates column of type geometry(Point, 4326).
I want to store ...
0
votes
0
answers
76
views
How to display content of dwg file in my NextJS app?
I am desperate. I am building NextJS app with AdonisJS backend. This app will work like warehouse planner, user should be able to put some elements like floor, wall etc. on grid and move it around, ...
1
vote
1
answer
93
views
Multiple Model Authentication using AdonisJS V6
I am using AdonisJS V6 ("@adonisjs/core": "^6.17.2") and auth version "@adonisjs/auth": "^9.3.1", for backend development. I have two models User and Admin. ...
0
votes
0
answers
108
views
EBUSY Error: "resource busy or locked, rmdir" When Creating an AdonisJS Project on Windows
I'm encountering issues when trying to create a new AdonisJS project using the following command:
npm init adonis-ts-app@latest test-adonisjs
On my Windows 11 machine, the process begins correctly—the ...
0
votes
0
answers
51
views
AdonisJS signed URLs secret key location
There's a AdonisJS application version 5.9.0 that uses signed URLs. The function exists on the http-server package and ends up calling the adonisjs-encryption sign method to sign URLs. The signing ...
0
votes
0
answers
108
views
E_UNAUTHORIZED_ACCESS Error with AdonisJs and Google oAuth
I created a project with adonisjs by setting up google oAuth authentication. When I launch a call via postman on a route protected by my auth_middleware, I get the error 401 E_UNAUTHORIZED_ACCESS
...
2
votes
0
answers
264
views
Turborepo, AdonisJS, error sharing type between backend application and packages
I would like to use AdonisJS in a mono repo managed by turbo repo.
I have an admin app (React) and a backend app (AdonisJS).
I have a type package to share my types between backend and frontend.
In my ...
1
vote
0
answers
187
views
AdonisJS 6 REST API social auth for React (TS) Front end
I'm using AdonisJS 6 to create a REST API for my web app (and mobile app in the future). The user can login using email + password or Google (OAuth).
My API is running in URL https://api.example.com ...
0
votes
0
answers
208
views
Compiling and running Adonis app with pm2 (typescript)
I finally managed to compile (npx tsc) and execute my Adonis 6 typescript app with pm2:
When I check with pm2 list looks like everything is ok:
However, checking logs I see this error:
I am using ...
1
vote
2
answers
1k
views
What is the best stack and architecture for a local first application (online/offline) with a distant backend? [closed]
Context
Hello, I have some questions about a project, and my ideas are not that clear.
I would create a local first application with ElectronJS, so basically store some data like user data, user ...
0
votes
0
answers
57
views
Dockerizing Adonisjs throw a SyntaxError
I'm trying to Dockerize Adonis following the tutorial of Adonis and the base installation :
https://v5-docs.adonisjs.com/cookbooks/dockerizing-adonis
https://docs.adonisjs.com/guides/getting-started/...
0
votes
1
answer
38
views
CQL query working in DbVisualizer but not working in AdonisJS
I am running a CQL query in DbVisualizer tool which is working fine, but same query when I am running through AdonisJS (nodejs) I am getting below error:
Error executing Redis command: ResponseError: ...
0
votes
1
answer
147
views
How to make a soft-delete Many to Many relationship in Adonis.js?
My business case is for an online store
Items can be put into orders. Each item can be only in one active order at a time.
When order is cancelled, all the items return to available stock.
I'd like ...
0
votes
1
answer
356
views
Cannot construct [class LoginController] class with AdonisJs v6
I have some problem with class AdonisJS.
My code LoginController
export default class LoginController {
constructor(protected authService: AuthService) {}
@inject()
doLogin({ request }) {
...
1
vote
0
answers
431
views
Adonis.js in production : ENOENT: no such file or directory, open '/public/assets/.vite/manifest.json'
I ask my first question on stack because I despair :(
Sorry if my english isn't good !
I develop a simple Quiz app with adonisjs to learn the framework and application deployment.
My problem is during ...
0
votes
1
answer
730
views
Adonisjs 6: How to dockerize with vite and tailwindcss?
I'm encountering issues while dockerizing my project developed in AdonisJS 6. I have configured my project using Edge and TailwindCSS to process PDFs with Playwright, and I've used Vite to set up the ...
0
votes
1
answer
209
views
Using DOM in AdonisJS with Playwright for PDF generation
I'm seeking guidance on utilizing the DOM in AdonisJS for a specific use case.
I understand that AdonisJS is primarily designed for server-side development and may not automatically include TypeScript ...
0
votes
1
answer
225
views
Adonis.js API return mismatch time as compared time in PostgreSQL DB?
Im trying to retrieve data where date time is very important. But the time stored in DB is correct, but it mismatch when I called the API. The date and time stored in DB with data type "...
4
votes
1
answer
6k
views
NestJS VS AdonisJS
I am about to embark on a new project. So far, I have been working with ExpressJS for my backend, but I find that I am reinventing the wheel a bit too much. Since I always strive to improve my ...
1
vote
1
answer
85
views
Alternate show of every 3 then every 1 item
My current code is like this which alternates between showing every 2 then every 1 item inside loop. I want it to show every 3 then every 1 item.
I use Adonis JS template engine (Edge)
<div class=&...
1
vote
0
answers
177
views
how to download excel in adonis js
I want to download excel using below code.
Are there any easy way to download excel?
const filename = request.input('filename')
const users = await User.all()
const columnKeys = Object.keys(users[0].$...
4
votes
0
answers
620
views
Cannot find module '@ioc:Adonis/Core/HttpContext' or its corresponding type declarations
I installed adonis core for building my SDK for adonisjs but I get
Cannot find module '@ioc:Adonis/Core/HttpContext' or its corresponding type declarations.ts(2307)
I'm not building an adonis server ...
0
votes
1
answer
173
views
Best Practice in Adonis.js: User hasOne Role or Role hasMany Users?
I'm working on an application in Adonis.js, and I'm designing the database structure. In this application, a user can be associated with a specific role (like 'admin,' 'user,' etc.) that determines ...
0
votes
2
answers
548
views
Adonis JS 5: How do I make a validator class for both HTTP requests and plain data validation?
I have a TaskValidator class in Adonis that handles validation. It works fine for normal HTTP requests in my controller. However, I also want it to be able to handle validation where there is no http ...