How to find reverse dependencies on npm package?

I'd like to find out which packages depend on express among the installed sails/kraken/loopback/hapi/koa etc. Are there npm sub-commands or other ways to locally list all reverse dependencies on...

Koa2 request.body is empty

I am working on a web service with koa2 and node6. My koa dependencies as follows; "koa": "^2.0.0-alpha.4", "koa-async-body": "^1.0.4", "koa-bodyparser": "^3.2.0", "koa-logger":...

what's the difference between koa-body vs koa-bodyparser?

I'm developing node server using koa.js I have looked for some libraries for body parser. And there are several kinds of koa body parser. But I don't know what differences btw them including...

Football Team: Objects and Classes

Before I post my question, I just need guidance on how to improve my java program, because I want to learn. So, for my assignment I need to: Create 3 classes, app, football player and football...

Koa router: How to get query string params?

I'm using koa-router. How can I get the request's query string params? This is the best I managed to write: import koaRouter from 'koa-router'; const router = koaRouter({ prefix: '/courses'...

Webpack dev server throws error - Refused to execute script because its MIME type ('text/html') is not executable

I use Webpack bundler and Webpack dev server for local development. The front-end is in React.js+Redux and the back-end in Node.js and koajs. In back-end, I use passportjs library for user...

Firebase functions: koa.js server how to deploy

I already have an app written in MERN stack with koa server prepared build version. My main node file to run by node server.js command to start the whole app looks like this. In every tutorial, I...

How to set http status code in GraphQL

I want to set an http status code in my GraphQL authentication query, depending on if auth attempt was successful (200), unauthorised (401) or missing parameters (422). I am using Koa and Apollo...

How can I connect to a database as another user?

Im currently creating an API for a school project and everything is working good. My setup is: Node v10, Postgres, Koa and so on... I currently have this: CREATE ROLE sa WITH LOGIN PASSWORD...

Koa.js: Centralized error handling

I'm using Koa.js and MongoDB via Mongoose. I'm want to know how to implement a perfect centralized error handling mechanism. For instance, there is some issue in the function that I've written to...

Why can't I serve static files from a Koa router?

Why in the following case does koa-static fail to work with koa-router? const Koa = require("koa") const serve = require("koa-static") const Router = require("koa-router") const app = new...

TypeScript error TS2403: Subsequent variable declarations must have the same type

I seem to be running into some compile errors on my TypeScript project. The full error is: node_modules/@types/mocha/index.d.ts:2680:13 - error TS2403: Subsequent variable declarations must have...

koa-passport logout() is not clearing session

I am using koa, koa-passport and koa-session to log users in which works fine but when I call ctx.logout() the user can refresh and still be logged in. It seems that ctx.session and/or the cookies...

Using Koa Routes with Heroku returns 404 errors

I am building my first Shopify public app and used their Next.js and React example to get started. I needed to create an API and couldn't route it with Next.js so I added Koa and Koa-Routes to map...

Swagger Bearer Authorization not usable in ui

I am using openApi 3.0 specification, koa2-swagger-ui, and swagger-jsdoc. I am trying to get the Authorize button on the swagger ui to allow me to enter a JWT token so my requests will be...

Redact request headers from pino logging

I'm using koa-pino-logger and by default I get that full request details when the request is completed: req: { "id": 1, "method": "POST", "url":...

Authorization server, Oauth2 and auth0

I have some questions because I don't understand well how implement authentication flow. Reading some docs I found image below Now, I understand the access token and refresh token, but I don't...

Async/Await in Express Middleware

I'm having trouble understanding how to properly write middleware in Express that utilizes async/await, but doesn't leave a Promise floating in the ether after it's execution. I've read a ton of...

TypeORM fails to connect without any error message

I am trying to get started with TypeORM, but cannot get createConnection to work. I run the default tpyeorm init server file, but there is not error or logging shown, nor is the postgres DB...

How Can I Serve Static Content Alongside Dynamic Routes in A Deno Oak Server

I am used to working with NodeJS and Koa. I've been playing with Deno and have run the example of a static fileserver: /* static_server.js */ import { Application } from...

Webhooks in shopify/shopify-api using nodejs

I was testing the node shopify-api and I noticed that there was a code in server.js that registers the APP_UNINSTALLED webhook. so, I added the code below to try to receive the FULFILLMENTS_UPDATE...

Javascript Runs out of Memory when connecting to Postgres Database With Defined Entities in TypeORM

I am trying to connect to a Postgres Database running on my local computer with Typescript and TypeORM. This is part of updating an existing project to use TypeORM, so there is a bunch of existing...

Unable to get SHOP name

In the previous version I used to get the current shop name is like this: router.get("/api/app", async (ctx) => { let shop = ctx.session.shop; }); but, in the new version, i can't get the...

How do I use http2 with Node on Heroku (using Koa)

I have the following code... const PORT = process.env.PORT || 5000; const app = new Koa(); ... app.listen(PORT) This works great both locally and in Heroku. So now I want to use Http2 so I...

How to get the current shop in shopify when using NodeJS (Public App)?

I am new to Shopify App Devlopment, especially the Shopify API. I create a working app with the Shopify CLI and now want to communicate with the API. I try to access following endpoint:...

Using Vite for backend

We are using Vite for our frontend (inside SvelteKit) and it works nicely with creating SSR and frontend code. I especially like the prebundling of 3rd party packages via esbuild. Can someone tell...

In NextJS how to pass data from server.js to _app.js?

In my NextJS project, I'm using koa as the web framework in server.js file, what I want to do is as follows, Do some external api calls to generate some custom data in server.js per each...

How to get raw request body in Strapi controller

Having trouble getting the request body in Strapi contoller. I am trying to send email(provider I am using is SendGrid) after user makes a POST request. Trying to make email dynamic. Post request...

upgrade nuxt 2.12 to 2.15.8 error "this dependency was not found"?

I'm trying to upgrade nuxt from 2.12 to 2.15.8 https://prnt.sc/1xrq08s and I get an error, how can I fix it? error message: This dependency was not...

install latest node version in Dockerfile

I have a Dockerfile FROM node:alpine WORKDIR /usr/app RUN apk update; \ apk upgrade; RUN apk add --update nodejs; \ apk add --update npm; RUN npm cache clean -f; \ npm install n...