Sockets.js not working

the app was using emberjs 3.10 and got upgraded to 6.4 and nodejs was 10.16.0 and currently it is 22.17.0

the previous implementation of sockets.js was importing socket from ember-phoenix but it stopped working after upgraded due to incompatibility of whirlpool with node 22. now i am trying to use the phoenix package to import the socket. previous was import { Socket } from ‘ember-phoenix‘ now i converted it to import { Socket } from ‘phoenix‘ but currently having errors in console:

Uncaught Error: Could not find module phoenix imported from <path>/sockets

Error while processing route: main.dashboard Could not find module phoenix imported from <path>/sockets Error: Could not find module phoenix imported from <path>/sockets

did you add phoenix as a dependency? I think you’ll need it as a first-class dependency in order to import from it properly.

i have multi app architecture and it have a shared app as an addon and it was being imported there and was not working so i had to add phoneix in the root package.json and it started to work

1 Like