Skip to content

Cannot find module 'ws' #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AustinMutschler opened this issue Jan 10, 2023 · 0 comments
Closed

Cannot find module 'ws' #481

AustinMutschler opened this issue Jan 10, 2023 · 0 comments

Comments

@AustinMutschler
Copy link

In the past day or so we noticed that our docker containers were no longer running correctly. When we looked at the error we saw this. They were working 3 days ago but not anymore. We have tried to re-build older code from a week or two ago that we knew worked and it also gave this same error message.

We were able to recreate locally as well.

Node 14
Socket Redis Adapter 7.x

Error: Cannot find module 'ws'
Require stack:
- /usr/share/backend-server/node_modules/@socket.io/redis-adapter/node_modules/socket.io-adapter/dist/index.js
- /usr/share/backend-server/node_modules/@socket.io/redis-adapter/dist/index.js
- /usr/share/backend-server/src/sockets/index.js
- /usr/share/backend-server/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/usr/share/backend-server/node_modules/@socket.io/redis-adapter/node_modules/socket.io-adapter/dist/index.js:7:19)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/backend-server/node_modules/@socket.io/redis-adapter/node_modules/socket.io-adapter/dist/index.js',
    '/usr/share/backend-server/node_modules/@socket.io/redis-adapter/dist/index.js',
    '/usr/share/backend-server/src/sockets/index.js',
    '/usr/share/backend-server/index.js'
  ]
}

We also noticed this warning while installing the packages:

#15 112.2 warning "@socket.io/redis-adapter > [email protected]" has unmet peer dependency "ws@*".

Please let us know if you have any guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant