6,569
questions
0
votes
0
answers
18
views
MVC framework for javascript instead of asp.net [closed]
I have to do MVC structure website for school project and I have some experience with react and next.js. We are doing it in asp.net but I am not good with C# so I want to use javascript. I tried sails ...
0
votes
0
answers
26
views
Unable to launch Sails DEV mode while using PostgreSQL as database due to long time to load orm hook
Hello fellow developers! Thanks in advance for reading this question. I am currently working on a program in which I've been unable to establish a successful launch of sails in DEV mode caused by a ...
1
vote
0
answers
19
views
AdapterError: '1st argument must be a dictionary' when creating a record using Sails.js and MongoDB
I am encountering an error while creating a record in my Sails.js application using the UserTM.create() method with a MongoDB database. The error message states:
Error [AdapterError]: Unexpected error ...
0
votes
1
answer
30
views
Using sails.log.crit() in Sails.js with and without Winston
I'm working on a Node.js application using the Sails framework. I've noticed that the sails.log.crit() function works without integrating Winston, but I can't find any documentation or records on this ...
0
votes
0
answers
31
views
Handling changes in user permissions across multiple layers (persona and company) in Sails.js
I am currently in the process of adding another layer of permissioning to our application - where it was previously handled by persona only, we are now allowing for company filtering too. So as an '...
0
votes
1
answer
12
views
SailsJS Does Not Invoke Controller Action When URL Ends With File Extension
SailsJS Does Not Invoke Controller Action When URL Ends With File Extension
I have a route set up to handle requests to an image...
./config/routes.js
module.exports.routes = {
...,
'/api/v1/...
0
votes
0
answers
66
views
Unable to set database URL dynamically in Sails.js
I am working on a Sails.js application where I need to dynamically set the database URL for my Mongodb database in the datastore configuration at runtime. The idea is to get the database URL with ...
0
votes
0
answers
29
views
Error: Encountered error during file download: Cannot pipe, not readableCannot pipe, not readable
I recently starting getting this error on my sailsjs project during deploy. Can someone assist in solving this?
error: Sending 500 ("Server Error") response:
ERROR Error: Encountered error ...
0
votes
0
answers
31
views
Sailsjs upload file nodejs v 18
I have the following problem, I work with Sailjs but on this occasion they asked me for compatibility issues to use Nodejs v18 which there is no problem except now that I have to upload some files ...
1
vote
1
answer
63
views
Sails.js CSRF token always changing for POST request
I have enabled csrf protection for my sails.js app and am calling the route to get the token for my POST request. However I keep getting a mismatch error for the post request.
This is my code to get ...
0
votes
0
answers
25
views
Connect Sails.js to Mongo Atlas
I have been trying to connect my Sails application to the cloud database Mongo Atlas. I got my sails application to lift all the datas are still being store in the local disk. I think I got my ...
0
votes
1
answer
17
views
how to call SailsJs controller function from ExpressJs router?
i want to call UserController from express js router
when i try to do it
i got Users.find is not a function
is this possible?
I want to integrations of express and sails same project
within single ...
0
votes
0
answers
69
views
Node.js server stops responding to requests
I have written a Node.js (14.17.1) web application using Sails.js (0.12.14) which internally uses Express.js (3.21.3). This application has been in production since more than 5 years (whith only minor ...
0
votes
1
answer
91
views
Node js promise-ftp: Error uploading file: Error: Can't open that file: No such file or directory
Using node js server and promise-ftp library, i want to upload a file "inventory.txt" to the FTP Server.
These are the imports:
const fs = require("fs");
const path = require("...
0
votes
0
answers
41
views
Sails js ORM isssue
I've been facing this issue 3 days
node v 14.15.1
sails v 1.5.2
I have upgraded and downgraded nodeJs version and sails js version also downgraded sail-mongo
0
votes
0
answers
42
views
Can not connect to sails socket
I am trying to continously broadcast/publish/emit/send messages to a socket room using Sails on my backend, and on another project continously recieve these messages.
Expected behaviour : every time ...
0
votes
0
answers
22
views
How to achieve non resourceful socket communication with Sails js?
I am trying to continously broadcast/publish/emit/send messages to a socket room using Sails on my backend, and on another project continously recieve these messages.
Expected behaviour : every time ...
0
votes
1
answer
28
views
Why aren't models being imported in my Sails application?
I'm helping someone out who's got existing code written in JavaScript using the Sails framework. For context, I currently have zero experience with this framework.
Why aren't the application's models ...
1
vote
0
answers
875
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 ...
0
votes
0
answers
137
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:
......
0
votes
1
answer
52
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/...
0
votes
0
answers
62
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 ...
1
vote
1
answer
49
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 ...
-2
votes
1
answer
68
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 ...
0
votes
2
answers
49
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....
0
votes
2
answers
67
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 ...
0
votes
1
answer
113
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).
...
0
votes
1
answer
84
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 ...
0
votes
1
answer
48
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 ...
0
votes
0
answers
31
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 ...
0
votes
1
answer
135
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
...
0
votes
1
answer
49
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 ...
3
votes
1
answer
583
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&...
1
vote
0
answers
35
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 ...
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 ...
1
vote
0
answers
98
views
getting batch request from gmail api
messageList we are sending message ids
function getGmailMessagesBatch(oauth2Client, messagesList) {
var batchBody = \ [\];
var indReq = '';
if (oauth2Client && oauth2Client....
1
vote
0
answers
225
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
...
1
vote
0
answers
104
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 ...
0
votes
2
answers
437
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&...
-2
votes
1
answer
992
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: ...
0
votes
1
answer
636
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:
"...
0
votes
1
answer
44
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 ...
0
votes
1
answer
31
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: {
...
1
vote
0
answers
69
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 {"...
0
votes
1
answer
48
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 ...
0
votes
1
answer
18
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(...
3
votes
1
answer
48
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 ...
1
vote
1
answer
55
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 ...
0
votes
1
answer
25
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 ...
1
vote
1
answer
40
views
How to unit test waterline model create method instance
I want to unit test a function in my sails.js application using Mocha(test framework) and Sinon(test double library). This is how the function under test looks like
function saveNotifications(...