Questions tagged [adonis.js]

Adonis is a full stack, open source MVC framework for Node.js. The framework is inspired by the PHP framework Laravel.

AdonisJs is an MVC Framework for Node.js.

It includes:

  • Lucid ORM
  • Database Migrations
  • Authentication System
  • OAuth
  • Mailing System
  • Data Validator
  • Testing

Learn more on the website and check out the organization on Github.

739 questions
2
votes
1 answer

profilePic.move is not a function [AdonisJS]

I am facing the error while trying to upload a file(image) via the form on AdonisJS (I referred to the official docs @AdonisJS4.1 File Uploads) await profilePic.move(Helpers.tmpPath('uploads'), { name: 'custom.jpg', overwrite: true }) if…
Haripriya
  • 17
  • 3
2
votes
1 answer

Adonis session not persisting between tests

I've built a simple eCommerce application on Adonis JS. I'm trying to test the cart functionality where if the user adds an item to the cart and if it's already there in the cart, then it should simply increase the quantity. For this, I'm hitting…
Saravanan Sampathkumar
  • 3,201
  • 1
  • 20
  • 46
2
votes
0 answers

Knex slow releasing connection to pool

I've been tasked with dealing with a load of performance problems in an existing Adonis/Knex/Postgres API app. I'm new to Knex, and one issue I'm noticing right away is that the majority of time servicing an API request is spent in releasing…
Tom Locke
  • 284
  • 2
  • 10
2
votes
2 answers

Adonis migration:fresh command to recreate database and seed

Laravel has a command php artisan migrate:fresh, that "drop all tables from the database and then execute the migrate command". While coding some new migration, sometimes we need to migrate the database from scratch. Running refresh and reset…
Tiago Gouvêa
  • 15,036
  • 4
  • 75
  • 81
2
votes
2 answers

How to fix the ECONNRESET ioredis error in Adonisjs during deployment

When I tried to deploy AdonisJS to digital ocean or Azure, I get this error [ioredis] Unhandled error event: Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:209:20) My Adonis app requires Redis to run. I'm using a Redis…
Osinachi
  • 656
  • 8
  • 14
2
votes
1 answer

How to change project structure in AdonisJs?

client - Vue.js project server - AdonisJs API Vue.js works fine but AdonisJs doesn't want to start. How can this be implemented using only one package.json?
Artanisky
  • 21
  • 1
2
votes
2 answers

Cannot find module 'tslib' while dockerizing an Adonis app v5

I'm trying to dockerize an Adonis app built with version 5. I'm running into this error while starting this multi-container app: Error: Cannot find module 'tslib' Require stack: -…
msrumon
  • 1,250
  • 1
  • 10
  • 27
2
votes
1 answer
2
votes
3 answers

Adonis JS Primary key value is missing for user

I'm trying to make a migratiion of users model from adonis to postgres but I keep getting this error Primary key value is missing for user My model look like this: class User extends Model { static boot () { super.boot() …
2
votes
1 answer

AdonisJS unable to return response within a function (SAP HANA)

I am using SAP HANA CLIENT for NodeJS in my AdonisJS project. I am unable to return the response as json from the the function that connects to the database. Here is the code The controller method validateInvoice is first called async…
Ashik Basheer
  • 1,531
  • 3
  • 16
  • 36
2
votes
2 answers

Adonis 5 "make:migration command not found" any idea?

i read the basic documentation of new Adonis Js5, i make a new api serve and i compile the code with "node ace serve --watch" or "node ace build --watch" and always is the same "make:migration command not found" any idea for fix?
Gario3
  • 139
  • 2
  • 13
2
votes
1 answer

Adonis.js : How to select some attribute in query using Lucid Models

I wanna select some attribute in my query. This is my code in controllers const Category = use('App/Models/Category') class CategoryController { async getCategories({request,response}) { try { let categories = await…
atjab
  • 127
  • 2
  • 16
2
votes
1 answer

How can I use a command from another container using Docker Compose?

I have two Dockerfiles: one for adonis (with node docker's hub image) and another for mongo (with mongo docker's hub image). The mongo_service must depend on adonis service because I only want to run adonis after starting all the mongo…
pmpc
  • 315
  • 4
  • 19
2
votes
0 answers

Adonis factory TypeError: Cannot read property 'name' of undefined

This may have been asked already, but the answers I found didn't work on me, so I hope someone can help me :) Lately I've been trying to seed my database, but I'm stuck at one problem... I kept getting this error: TypeError: Cannot read property…
goodkat
  • 41
  • 1
  • 4
2
votes
1 answer

Adonis Query Builder: How to make .where condition on relationship

So I have this query return await Order .query() .with('order_status') .where('order_status.is_completed_type', true) I want to only get the orders with order_status.is_completed_type === true but it seems that doesn't work that…
frost kazuma
  • 350
  • 1
  • 8
  • 24