Skip to content

Signalr with Angular SSR: Cannot find module 'request' #10400

Closed
@rceraline

Description

@rceraline

Describe the bug

When using SignalR with Angular in SSR it throws an error. It used to be the error describe in this issue #7823 but after updating to version 1.1.4, the error is now the following:

NodeInvocationException: Prerendering failed because of error: Error: Cannot find module 'request' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object../node_modules/@aspnet/signalr/dist/cjs/NodeHttpClient.js

To Reproduce

Steps to reproduce the behavior:

  1. Create a project with asp.net core & Angular 7
  2. Configure SSR
  3. Use @aspnet/signalr 1.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions