Skip to content

Error: Can't resolve 'uws' #575

@evpozdniakov

Description

@evpozdniakov

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

I use socket.io, therefore engine.io is one of my depended packages.
When I try to bundle my project, I have error
Module not found: Error: Can't resolve 'uws' in node_modules/engine.io/lib/server.js
(The error would not be here if I configure webpack with webpack-node-externals, but I really need all packages in a single bundle for docker container.)

Steps to reproduce (if the current behaviour is a bug)

  1. Add socket.io v2.2.0 to your existing project (which uses webpack) as a production dependency.
  2. Require it in your entry point code.
  3. Run webpack

Expected behaviour

It should create a bundle without errors.

Setup

  • OS: centOS
  • browser: server side (node.js)
  • engine.io version: 3.3.2

Other information (e.g. stacktraces, related issues, suggestions how to fix)

IMO it could be fixed if engine.io declares uws as a prod dependency (not a dev dependency).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions