Questions tagged [sails.js]

Sails.js is a web framework that makes it easy to build custom, enterprise-grade Node.js apps. It is designed to resemble the MVC architecture from frameworks like Ruby on Rails, but with support for the more modern, data-oriented style of web app development.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Sail npm run dev

I'm new to Laravel, My application is Laravel, Vue + InertiaJS. I start my docker in terminal with sail up -d This will start the docker container, then I navigate to the url of my application, when ...
pH Jhop's user avatar
  • 11
0 votes
0 answers
52 views

Segmentation fault on WSL during Laravel installation

I'm using WSL with Ububtu and Docker installed. Trying to install Laravel using command: curl -s https://laravel.build/test-project | bash After some minutes the installation interrupt with errors: ......
ISFT's user avatar
  • 1
0 votes
0 answers
10 views

Grunt :: An error occurred. SailsJS when lifting: Frontend is missing

i want to lift my sails project, but I got problems with my Gruntfile. When I do my sails lift, I got that error message: The main problem is that the frontend doesn't load after I lifted the project....
Benedikt Faude's user avatar
0 votes
0 answers
15 views

Unable to run Sails after npm install

I am trying to set up a new sails application but when I try to install sails with npm, it says I need to fund packages and gives me the error "command not found: sails." The thing is in my ...
LoFi's user avatar
  • 1
0 votes
1 answer
40 views

Can someone please give me guidence to resolve this error message?

[0] Unhandled rejection MongoError: (Unauthorized) not authorized on admin to execute command { listIndexes: "sessions", cursor: { } } [0] at MongoError.create (/Users/biggahd/Desktop/...
Dženis H.'s user avatar
  • 7,561
0 votes
0 answers
23 views

Could not load Connect session adapter :: connect-mongo

I keep getting this error and my Sails (v0.12) won't start. I triend everything and to be honest I do not really undertand the message itself. Can some lease give me guidence. I'm using MongoDB Atlas. ...
Dženis H.'s user avatar
  • 7,561
0 votes
0 answers
37 views

Sails: io.socket.get requests are throwing 401 Unauthorized

I recently upgraded the version of Sails from version 1.5.2 to 1.5.7 for Vulnerability Fix. This is my first time working with sails and node. So, there are lots of gaps in my understanding. After the ...
Rachet's user avatar
  • 26
0 votes
1 answer
32 views

how to use i18next in sailsjs

we are using handlebar to render the view and now must use i18next lib to render the translated pages in our sailsjs backend but i could not find any example on how to integrate i18next in sailsjs and ...
MAK's user avatar
  • 163
0 votes
0 answers
21 views

How to correctly set up test.js in config.env

I followed the steps below, and now I'm working and running my test files correctly: Installed Mocha, Chai, Sinon, Supertest, and NYC. Set up the testing directory with the lifecycle.test.js file ...
Juan Pablo Alegre's user avatar
-2 votes
1 answer
51 views

Every time i create new sails project and try to log in this error will come help me with this plz

enter image description here CloudError: Endpoint (`observeMySession`) responded with an error (or the request failed). I need to fix this error this is my browser console error and those come while ...
Ashen madalagama's user avatar
0 votes
2 answers
45 views

node axios call does not await promise

When I make network call via axios, the consuming service does not await it Executing function: accountResolved: (atNumber, bkCode) => { return new Promise((resolve, reject) => { axios....
Caesar's user avatar
  • 59
0 votes
2 answers
63 views

CloudError: Endpoint (observeMySession) responded with an error

Node version: 20.5.0 Sails version (sails): 1.5.7 ORM hook version (sails-hook-orm): 4.0.0 Sockets hook version (sails-hook-sockets): 2.0.0 Organics hook version (sails-hook-organics): 2.0.0 Grunt ...
user1265083's user avatar
0 votes
0 answers
15 views

Waterline queries with low-level Driver

We have an application in Sailsjs v1.x where we need to connect to databases dynamically based on a request parameter. Since datastores cannot achieve this, we tried the method given here by using ...
ktrev's user avatar
  • 37
0 votes
1 answer
62 views

Socket with Sails JS and React JS

I have an live Bid system. In Bid page we show Base and Bid Price of item. When any user update price of item then i want to reflect that price to all the customer who has Bid page open(without load). ...
Tushar Donda's user avatar
0 votes
0 answers
15 views

How to create one to many association in sails.js with mongoDB, especially when the id is a string and not an ObjectId?

I am working with the Waterline ORM sails.js in my Node.js application, and I have two models, "Owners" and "Pets." The issue I'm facing is that the "id" field in the &...
Vishwanathan's user avatar
0 votes
1 answer
70 views

sails.io.js with Svelte3/4 SvelteKit

I've been trying to port my app from older Svelte3/Rollup to newer Vite based setup and am having trouble initializing sails.io.js client to work inside Svelte. What used to work really well in the ...
Eximorp's user avatar
  • 301
0 votes
0 answers
38 views

Sails js adapter not able to get connection due to poolsize

Sails js adapter is not able to get connection due to poolsize, i think increasing poolsize should solve the problem, anyone else faced this and how you fixed it. Getting below error Unexpected error ...
shyam agarwal's user avatar
0 votes
1 answer
31 views

Sailsjs file upload get stuck when using PM2 and node > 12

I'm facing a weird behaviour, and I don't know where to look anymore. Here is the bug : When I upload a file, it starts then stops after 2 or 3 "progress" events. Then nothings happened, it ...
Francois's user avatar
0 votes
0 answers
19 views

Sailsjs 1.0 and mongo adapter aggregate query

I'm trying to perform an aggregate query that uses the $dateToString aggregation function but whenever I execute it i get the following error: can't convert from BSON type string to Date Note that if ...
Xfox's user avatar
  • 321
0 votes
0 answers
28 views

Mapping of an array of string Ids using lookup in MongoDB not working in Sails.js

Sails.js >> Collection : Blog, BlogCategory. Blog collection has an array of categories id as string value. I want all blog data with populate categories. Bellow query work fine in NoSqlBooster ...
Tushar Donda's user avatar
0 votes
1 answer
94 views

Why can't I open images uploaded to Google Drive using Dropzone and Javascript?

I've been trying to upload images using dropzone and save them in google drive. Here is the code data = google.drive({ version: "v3", auth ...
severine julie's user avatar
0 votes
1 answer
35 views

Validate sailsjs session cookie

I have a sailsjs frontend that receives an http request, and generates a cookie as explained on https://sailsjs.com/documentation/concepts/sessions. The frontend then makes an http request to another ...
Oliver's user avatar
  • 28.2k
0 votes
0 answers
23 views

how to restrict request when entity in requests is too large in node js?

I am using sails js version 1.2.4 and node version 12.16.1. I am suddenly getting http 413 error code that is Request entity too large in error logs of my server and i am sure that i have not sent ...
Prem popatia's user avatar
0 votes
0 answers
69 views

how to download/fetch file in microsoft sharepoint using sails js

Assuming that the Sharepoint is already authenticated. Below is my code and I keep on getting an error that the xlsx file is unsupported file. Currently I am using this library to fetch xlsx file in ...
stribb's user avatar
  • 25
0 votes
0 answers
47 views

Sails.js and node-cron (trying to make the scheduler work on my birthday reminder app)

I'Ve been having troubles scheduling reminder on my birthday reminder app. I tried using cron, got it running semi-way and it im still getting errors. I need some help. this is the error on my ...
Barbs's user avatar
  • 1
0 votes
0 answers
28 views

Error in node application - "Cannot read properties of undefined"

I downloaded my sails project from github which I created few years ago. When I try to run the sails.js project using "sails lift" than the following error comes up. PS: I am new to Sails....
Mithilesh Patil's user avatar
0 votes
0 answers
36 views

sails.sendNativeQuery not working with postgresql adapter version 5 and nodejs 18

I'm facing a problem after to update my sails, postgre adapter and nodejs version when i try to use sails.sendNativeQuery in my log i receive it: debug: { command: undefined, rowCount: undefined, oid: ...
Ademir Gomes's user avatar
3 votes
1 answer
266 views

Alternative to Sails Mongo Adapter to support MongoDB 5.0 & 6.0?

Any alternatives to sails-mongo adapter? According to Sails-Mongo Compatibility, sails-mongo only supports up to MongoDB 4.2. Current issue I face is the below: error: Sending 500 ("Server Error&...
E. Oregel's user avatar
  • 331
0 votes
0 answers
25 views

Sails.js error - Cannot read package.json in the current directory

When I run the pre-existing sails project, the warning appears in the cmd prompt. When I run "http://localhost:1337/" in the browser, than Ps: I am new to sails.js
Mithilesh Patil's user avatar
0 votes
0 answers
26 views

Does Sails.js/waterline parameterized query really protect against sql injection (official document)?

I'm using waterline v0.11 (yes,very old) and postgresql 11, i heard that the parameterized query protect against sql injection in sails but i can not find any official document about this. I've ...
kanfam's user avatar
  • 1
1 vote
0 answers
31 views

SailsJS clickJacking is working for api calls and redirects but when using curl command it does not show X-Frame-options in return details

I have angular/Node/Sails setup and when I call the site it always redirects to a default state and all the calls in network have X-Frame-Options turned on and displayed in the calls but when I am ...
Pathik Parikh's user avatar
0 votes
0 answers
49 views

Connect Azure Postgresql database in sailsjs

I'm trying to connect my azure postgresql database to my sails app, using sails-postgresql adapter my connection url is this url:'postgresql://<username>@<servername>:<password>@<...
Dileepa Mabulage's user avatar
2 votes
2 answers
55 views

How to property create and reference dynamic variable names in script

I have a piece of code which works manually, but I am trying to make more reusable for growth. In the function's current state, it sets a large list of manually created arrays. Then does a DB call for ...
Shane Quinn's user avatar
1 vote
0 answers
64 views

getting batch request from gmail api

messageList we are sending message ids function getGmailMessagesBatch(oauth2Client, messagesList) { var batchBody = \ [\]; var indReq = ''; if (oauth2Client && oauth2Client....
Yashwant Yadav's user avatar
0 votes
0 answers
52 views

Error while uploading Multiple Files with different File Names With Skipper in Sails Js

I am trying to upload multiple type of files to S3 in sails js Files are as Follow : VehicleImages, VehicleVideos, VehicleDocuments I am passing these three type of files with attribute name with same ...
Muhammad Talha's user avatar
1 vote
0 answers
108 views

What is node:internal/process/promises:279 coming from sails lift

I'm trying to launch sails lift on my back end on vs code and I keep getting this error. I want to know what it means and how to debug it. node:internal/process/promises:279 ...
tim_l's user avatar
  • 11
0 votes
0 answers
26 views

Sails avoid action exit on exception in loop

An Action is calling the helper function inside the loop. If the helper function raise some error then it exits with a specific code queryFailed like follows: helpers/a/execute.js module.exports = { ...
Akshat Uppal's user avatar
0 votes
0 answers
20 views

Set Attribute of Json Object Using sails-mongo, Sails Js

I want to modify a json object stored in field "additionalCharges" for Vehicles in Database. The main goal is to update the specific without replacing the whole json object. This should ...
Muhammad Talha's user avatar
1 vote
0 answers
95 views

SailsJS connection with Azure MS SQL Database

I installed the latest version of Sails on my computer and created a new project. I am using SailsJS as my API and want to connect to the clients' Azure MS SQL database. I tried using the mssql npm ...
Mauritz Kruger's user avatar
0 votes
2 answers
185 views

How do i sort the dates in a array in ascending order in nodejs?

In my code i have an array how do i sort the array in the ascending order "class_dates": [ "2023-02-04", "2023-02-11", "2023-02-18", "2023-02-25&...
Ram prasad's user avatar
-2 votes
1 answer
713 views

Laravel artisan migrate problem SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known

When I run ./vendor/bin/sail artisan migrate. I am getting this kind of error. Illuminate\Database\QueryException SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: ...
anaha manaha's user avatar
0 votes
1 answer
314 views

Laravel package development inside sail not syncing changes

I am developing a Laravel package, I have the main project and the package folder inside the same folder. code /mainproject /package Inside my composer.json in the main project I have: "...
Elliott Coe's user avatar
0 votes
1 answer
28 views

Dot in route parameter doesn't match route in sailsjs

One of my route parameters has a dot in the route parameter. The route is /len/:abc. Here abc is going to be -2.2,3.2,5.4. When I call the requeust /test/len/-2.2,3.2,5.4 I get a 404 error. When I ...
soothsayer's user avatar
0 votes
1 answer
21 views

Usage of sails.getDatastore().driver with a generic datastore

I have to change and query DBs dynamically. Hence, I thought to use sails.getDataStore().driver to manage that. My config.datastores.js is like below: module.exports.datastores = { default: { ...
SM1312's user avatar
  • 556
1 vote
0 answers
65 views

Insert a bulk of records into the Postgresql DB using Sails.js and Waterline ORM

I need to insert a bulk of records into the Postgresql database using the Sails.js framework and the Waterline ORM. I have a file with 100k records of users and their links: // users.txt line 1 {"...
Yurii Pakhota's user avatar
0 votes
1 answer
42 views

Cant access main parents callback function inside mongo query | cb is not a function

I am working with mongodb in sails js. we are using async.auto from async.js. I am creating a new mongo connection for few reasons and firing find query to get the data, after retrieving data from db ...
Abhishek Kokate's user avatar
0 votes
1 answer
17 views

How to implement sorting

How to implement sort method in sails.js? When I run this code try{ let sort = req.param('name') let mysort = {} mysort.name = sort; let find = await dynamic.find().sort(...
Shiv Mehta's user avatar
3 votes
1 answer
46 views

Multiple field pass to get the query failed

I am trying to find the list of users based on the different queries. Like if I pass firstname or lastname or location I want data based on one of them or all of them but I've failed to get the ...
Developer Nans's user avatar
1 vote
1 answer
50 views

Failed to filter array of data based on there condition

I want to retrieve based on their list of IDs given. There is a list of ids I used inside my controller I want to retrieve all the objects array based on the given list of ids to me here is a ...
Developer Nans's user avatar
0 votes
1 answer
23 views

Load Sails programmatically and work with models

I see that I can access models at sails.models after loading sails programmatically, but I can't figure out how to find and update models. I want to do something like this, is it possible? const Sails ...
GGGforce's user avatar
  • 632

1
2 3 4 5
132