396 questions
Score of 1
0 answers
51 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 ...
Score of -2
1 answer
76 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 ...
Score of 3
1 answer
718 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&...
Score of 3
1 answer
74 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 ...
Score of 1
1 answer
75 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 ...
Score of -1
1 answer
103 views
Need solution to search case insensitive fields, REACT, sailis , mongodb
Adapter i am using is
adapter: "sails-mongo",
I am trying to query for matches,
example: Assume Values in DB for field (name) are JOHN , John, JohN , john, JOhn martin
If i search with a ...
Score of 0
1 answer
52 views
Cannot add the 15th collection to Sails Mongo
I am getting a failure whenever I try to add my 15th collection.
errorType': 'Error', 'errorMessage': 'Callback was already called.', 'trace': ['Error: Callback was already called.', '
at eval (...
Score of 0
1 answer
496 views
How to handle DB error in node mongoDB query?
I have a code in node - sails js mongo db code like this, it is for user signup:
signup fn:
try{
let err;
let user = await User.create({req.body}).fetch();
if (!user){
throw new ...
Score of 1
0 answers
208 views
Sails.js default app fails to start with MongoDb
I created a WebApp with sails new my-app and am trying to use mongodb as its database. I am running mongodb in docker and am able to connect to the database using GUI tools like MongoDB Compass. Using ...
Score of 1
1 answer
1009 views
MongoDB aggregation queries in sails js
How do we write the aggregation queries in sails js other than sum and average.
Like we have Model.aggregate() method in mongoose so how is the same thing done using sails-mongo
Score of 0
1 answer
237 views
How to use bcrypt.compare in sails js schema?
I have a user model like this:
module.exports = {
attributes: {
email: {
type: 'string',
isEmail: true,
unique: true,
required: true
},
password: {
type: '...
Score of 0
1 answer
53 views
Reading data from mongodb using sails js removes all collection data, why?
I have a sails js app,
The following codes works fine:
list: async(req, res) => {
Data.find({}).exec((err, data)=>{
if(err){
res.send(500, {message: 'db error'});
}
...
Score of 0
1 answer
340 views
.find is not a function in sails js mongodb
I have
ArticlesController.js
const Articles = require('../models/Articles');
module.exports = {
list: async(req, res) => {
const articles = await Articles.find({});
console.log(articles);...
Score of 0
0 answers
493 views
SailsJS MongoDB connector error: Error: Consistency violation: Unexpected error creating db connection manager: MongoError: Authentication failed
I am getting the error : error: Error: Consistency violation: Unexpected error creating db connection manager: MongoError: Authentication failed. Password is fine and I am able to connect with ...
Score of 0
0 answers
93 views
In sails mongo, datatype mismatch issue
Here is the request I am sending to create the record in MongoDB. StatusId datatype is an integer, but After create query DB has a string value of statusId. Don't know where I am going wrong. This is ...