Questions tagged [feathersjs]
Feathers is a library that extends Express with the ability to easily create shared RESTful web services and real-time APIs using SocketIO and other websocket libraries.
849
questions
0
votes
1
answer
14
views
How to handle errors using `.catch` in promises
I want to continue code execution when my promises do not have errors, If there are any errors however, I do not want to proceed. How do I gracefully handle this case ?
Eg.
/* start of REST call */
...
0
votes
0
answers
13
views
Resetting a notification flag if a client edits event date
We have a system that sends event notifications to clients every 3days to the event, But when the client changes the date to a date more than 3 days notification flag is not reset so they do not ...
0
votes
0
answers
11
views
Feathers.js CRUD method fails after extending model
I want to move to Feathers.js after having to much of a headache migrating a Loopback3 App to LB4. We decided that since we need a complete overhaul anyway, we might as well move to a different ...
1
vote
1
answer
13
views
Feathersjs logger and hooks
Using FeathersJS and Sequelize-MariaDB for this particular App.
The DB and Service seem OK from the basic FeathersCLI initialisation
We then remove the logger module and replace it with our in-house ...
0
votes
1
answer
16
views
FeathersJS cannot create user with ObjectionJS and SQLite
I am experimenting with FeathersJS. To do so, I generated a new feathers app
$ feathers g app with the following configuration:
? Do you want to use JavaScript or TypeScript? JavaScript
? Project name ...
1
vote
0
answers
13
views
Using VueJS + FeathersJS + Feathers-Vuex, getting this error: Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0__.default is undefined
Here is the error:
Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0__.default is undefined
<anonymous> index.js:7
js app.js:96
__webpack_require__ app.js:397
fn app.js:643
&...
0
votes
0
answers
22
views
Mongoose $nin with array of ObjectId
I am facing a problem with mongoose. I can't do a query filter with $nin or $ne on an array of ObjectId.
Like:
query: {
objectIds: { $nin: [ objectId1, objectId2 ] }
}
I tried to send an ObjectId....
0
votes
0
answers
22
views
feathersjs prevent find after every create
This feels like a daft question but searching just seems to pull up the featherjs docs. which I find incredibly difficult to make sense of until you understand everything and being a bit new to ...
0
votes
0
answers
43
views
How to use feathers with graphql?
I want to build graphql in feathers.
And try below method。
from index.js
/* eslint-disable no-console */
const logger = require('./logger');
const app = require('./app');
const port = app.get('port');...
0
votes
1
answer
35
views
Using Google Oauth in FeathersJs with an existing access token
How do I use the Google Oauth in featherjs with an existing access token? The docs do not give an example on this. The only example is through the browser as shown here.
When going through the browser,...
0
votes
0
answers
38
views
Recursively populate parent-child tree from MongoDB collection
I have a MongoDB database with a collection, using a mixture of Parent and Child References.
Each document in the collection includes two properties: parentId and childIds.
The parentId property is an ...
0
votes
1
answer
26
views
feathersjs application not starting on heroku
I have an application which I deploy via github actions to heroku.
But it won't start, respectively it doesn't find the compiled sources to start the app.
Unfortunately I'm new to heroku and I can't ...
0
votes
1
answer
30
views
How to prevent multiple validations with async requests?
I have a user's item that needs to be validated 10 times (variable value) by other users. And when the item is validated 10 times, the item's owner gets a number of points.
But my problem is, if 400 ...
0
votes
0
answers
19
views
feathers js websocket throwing page not found
I used the feathers cli (v4.7.0) to generate a project. Local authentication chosen. Now when I'm trying to connect via the frontend feathers throws:
info: Page not found {"className":"...
0
votes
0
answers
16
views
patch associated rows in feathersjs and sequelize
I am using featherjs with sequelize adapter for the backend and React for the front end.
I have 3 tables associated as the following:
moldsets "has many" molds, molds "has many" ...
2
votes
1
answer
47
views
Mongoose $inc with enum validation failed
I'm working with featherJs and mongoose.
I have a schema with an enum which I want to $inc.
new Schema({
status: { type: Number, enum: [0, 1, 2, 3], default: 0 },
});
But when I $inc the 'status' ...
1
vote
0
answers
123
views
How to refresh feathers.js token with next-auth and next.js setup
Whenever a user logins in successfully, this is a sample of the server response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9....
0
votes
1
answer
64
views
Feathersjs with Sequelize, updating the model
I'm able to create a new service which creates a table in the MySQL DB just fine, but the feathersJS model file simply creates 1 text field in the model by default,
when I modify the fields add more ...
0
votes
1
answer
126
views
How To Group For Multiple Fields In Sequelize
I need one help related to the sequelize and I am using postgres.
I want to group records in sequelize. Also the form and user value comes after populate or using include method of sequelize.
I have ...
0
votes
2
answers
51
views
How to do a relatedQuery (many2many) with feathers-objection
Regarding to this post: https://stackoverflow.com/a/69903276/1547821
it shows an approach with less boilerplate, to prevent a users query output (GET) to only the user who is logged in.
But how to do ...
0
votes
0
answers
31
views
FeathersJS client querying compare two columns
In one of my project I need to filter the instances that a column A is greater than a column B of the same model and I did not find in the documentation how to make a reference to other column within ...
0
votes
1
answer
14
views
How to integrate auth step into feathers service
I'm trying to integrate jwt/local auth into any call to feathers. So by including user/pass in any call it authorizes, rather than requiring a individual previous call to the /authorization endpoint ...
0
votes
0
answers
24
views
What causes Feathers/node/express from slowing down?
We started using Feathers for our API about 6 months ago, and when we had just a few services defined, the service was really fast. Over time we've added more and more services, and now the API is ...
0
votes
0
answers
16
views
Feathers.js mongoose not returning ObjectId in afterSave hook
I have simple feathers hook as given here.
const syncPackageChannel = async (context) => {
const { _id } = context.data;
console.log(_id)
return context;
};
Here, It logs the _id undefined. ...
0
votes
0
answers
62
views
feathersjs jest-testing: You are trying to `import` a file after the Jest environment has been torn down
I'm working with feathersjs and the sequelize-adapter for it, which is used with MySQL.
I'm trying to implement a method I can get a user from my database by his name with.
So, my code in the method ...
1
vote
1
answer
131
views
Add a custom query parameter in Feathers request
I'm hoping to add a custom query parameter that can be used in a hook to process some results.
I'd like to add $foo=bar to the request. I can whitelist $foo and it appears in the request, but the ...
0
votes
0
answers
67
views
Implement or integrate jitsi-as-a-service(by 8x8) in our own nodejs or feathersjs backend server
I want to actually know is it possible to integrate jitsi as a service in our nodejs project. Basically what I want to achieve is that, I want to authenticate a user in my own web app first and then ...
1
vote
0
answers
34
views
Proper way to cleanup a mongo db() reference?
I'm making a multi tenant app using mongo db and would like to know what the proper procedure between switching between databases is. I know I can get a new reference to a database using the db() ...
6
votes
2
answers
207
views
Can't listen to event sent from feathers server to client
I'm building a server which uses feathers and socketio.
I'm trying to use feathers channels mechanism to notify relevant users (connections) on relevant events.
Users belong to groups, so upon ...
0
votes
1
answer
177
views
Feathersjs find request "invalid query parameter" error with reactjs
When I add $show:true to the data (shown below), the find request shows an error.
When I remove $show:true, there is no error and working fine.
Error is
Invalid query parameter $show.
I tried using ...
0
votes
0
answers
47
views
Error "Invalid query parameter $dis " from feathersjs (nodejs framework)
I am facing an invalid query parameter error from feathersjs back end . i am using react as front end. My request is .
I did not write this code initially. the $includeEc was already there, but that ...
0
votes
1
answer
39
views
How to create relationship between two tables using feathersjs, sequelize and postgresql
I have two models users.model.js and swing-trades.model.js when I am creating a relationship between these two models and running feathersjs using npm run dev`, I am getting an error.
throw new Error(...
0
votes
2
answers
171
views
How to prevent feathers.js from returning all users in the users route
I have been using feathers.js for sometime now and there's something I can't find after looking around. How do you prevent authenticated users from seeing all the users?
when I do a GET with postman ...
1
vote
1
answer
57
views
How to upload images in feathersjs and store it directly in mongodb database using mongoose
I am working on a project where I want to store the profile image of an user in the database.
Actually what I want to is to store the image itself in database not its URL or address and also I should ...
0
votes
0
answers
52
views
Unable to install feathers
I am trying to install feathers and I keep getting the command is not found.
I used the command
$ npm install @feathersjs/cli -g
but feathers is not recognized.
I keep on getting returned this:
bash: ...
0
votes
0
answers
38
views
Request another API in Feathers Hook
I am building an API with Feathers that should forward the request params of the client to another non-Feathers API. Where should I put the Requests to the other API, into a service or into a hook? ...
0
votes
0
answers
65
views
Implement change password functionality in feathersjs project
I am actually trying to implement change password functionality in my feathersjs project. what basically I am trying to do is, I am receiving input from user (old-password and new-password), first I ...
0
votes
0
answers
19
views
parsing files and data from multipart to feathers service called with axios
I have created this service by using "feathers generate service" - and picked sequalized
I want to be able to call the service from client with axios and currently my axios call looks like ...
1
vote
1
answer
97
views
Socketio doesnt work with webpack but works with CDN
I have a feathersjs app which uses socketio for the transport protocol. On my client side I use webpack to bundle the app, but I'm having issues with the socketio client connecting to the server. I'm ...
0
votes
0
answers
78
views
Which event does Feathers Authentication return after authenticating user login
I am learning Feathers. I try to understand which event a server side Feathers Authentication module sends back to the client after it authenticates the user login information injected from the client ...
-2
votes
1
answer
212
views
How to do soft delete in feathersJs using mongoose for mongoDb database
I want to implement the soft delete feature in the project I am working on currently. The project is using feathersjs and mongoose. If anybody is having any idea how to implement it inside feathers ...
0
votes
1
answer
97
views
Getter/Setter Mongoose FeathersJS on get or find
When using getter or setter in a mongoose schema, it is only call on create.
It's the same for a transform function in toJSON or toObject in schema options.
On a get or find there is no console.log()
...
0
votes
0
answers
129
views
Update / Patch not working in feathersjs app service with feathers-redis-cache used in hooks
I am using feathers-redis-cache in order to cache data for some of the services in my feathersjs app. This is how my hooks look like:
const {hooks: redisCache} = require('feathers-redis-cache');
///......
0
votes
0
answers
41
views
How to override a service method in feathersjs + typescript
How to use mongoose functions like .find(), .findOne() with feathers(typescript based) in a service override function.
0
votes
0
answers
34
views
Unique validation not working in feathers/mongoose [duplicate]
email: {
type: String,
unique: true,
lowercase: true.valueOf,
required: true
},
above is my code block for mongoose model.
the unique property is not working , I can create multiple users for the same ...
0
votes
0
answers
71
views
Jest: Typescript TS6059 rootDir warning on FeathersJS tests
I have a Typescript setup of FeathersJS with tests based on the feathers generated services.
Randomly, but especially after a fresh setup, I have this warning occurrence:
ts-jest[ts-compiler] (WARN) ...
1
vote
0
answers
127
views
Jest v27 FSREQCALLBACK warning with FeathersJS NeDB services
Since an upgrade to Jest v27 on my FeathersJS app, a bunch of warnings occurs at the end of the test suites:
Jest has detected the following 24 open handles potentially keeping Jest from exiting:
● ...
0
votes
0
answers
32
views
How to create this type of a m:n relationship in PostgreSQL with Sequelize?
I am fairly new to PostgreSQL and Sequelize, and I want to create this kind of a many to many relationship.
Users - Groups, Basically multiple groups can have multiple users and multiple users can ...
3
votes
1
answer
355
views
Type Script paths not working. Even after setting up "baseUrl" property in tsconfig.json
when I try to import {Model, Mongoose} from 'mongoose', it actually looks for ./src/mongoose.ts that's the file generated by feathers by default. this problem only arises when I use the below property ...
0
votes
1
answer
133
views
feathers-mongoose: Mongo-DB Transaction - ReferenceError: when is not defined
I am using Feathers 4.5.0 and Mongo 5.0.2 . I want to perform Mongo DB transactions on a collection. I copied the sample in feather-mongoose documentation into my service hook.
const ...