You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use node-mocks-http with NextJS API endpoint.
const mockRequest = httpMocks.createRequest({...}) as NextApiRequest;
This works fine fine until some other library (@opentelemetry/auto-instrumentation-node) brought in @types/express into my node_modules. At this point the code became unusable until I do as undefined as NextApiRequest.
The node-mocks-https is expected to mock the NodeJS HTTP requests, i.e. http.IncomingMessage, and not express.Request.
The text was updated successfully, but these errors were encountered:
I'm trying to use
node-mocks-http
with NextJS API endpoint.This works fine fine until some other library (
@opentelemetry/auto-instrumentation-node
) brought in @types/express into mynode_modules
. At this point the code became unusable until I doas undefined as NextApiRequest
.The
node-mocks-https
is expected to mock the NodeJS HTTP requests, i.e.http.IncomingMessage
, and notexpress.Request
.The text was updated successfully, but these errors were encountered: