SocketCluster / socketcluster

Highly scalable realtime pub/sub and RPC framework
https://socketcluster.io
MIT License
6.14k stars 313 forks source link

Can not use sc-uws on Ubuntu 18.04, node 10.12.0 #455

Open Jerar opened 5 years ago

Jerar commented 5 years ago

I tried to use sc-uws engine on both, socketcluster boiler app and in sc-crud-sample. In both cases it failed with folowing ( i get it from build_log.txt in /node_modules/sc-uws/built-log.txt): ws.target.mk:106: recipe for target 'Release/obj.target/uws/src/addon.o' failed make: *** [Release/obj.target/uws/src/addon.o] Error 1 make: Leaving directory '/home/dev/Code/sc-crud-sample/node_modules/sc-uws/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/dev/.nvm/versions/node/v10.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Linux 4.15.0-38-generic

Are there any dependencies or something ?

happilymarrieddad commented 5 years ago

I know this doesn't directly answer your question but I had to do build and run on Docker to get it to work. Here is my Dockerfile

FROM node:8.12.0-onbuild

RUN apt update -y
RUN apt install build-essential -y

WORKDIR /app
COPY ./package.json ./
RUN npm install
COPY . .

RUN npm remove sc-uws --save
RUN npm install sc-uws --save

CMD ["npm","run","start"]
happilymarrieddad commented 5 years ago

Very weird that I had to remove it from the package.json and then add it again. That was the only way I could get it to work....

Jerar commented 5 years ago

I'll give it a try, thank you for your answer :)

vasild commented 4 years ago

According to this comment https://github.com/SocketCluster/socketcluster/issues/497#issuecomment-503404420 sc-uws only compiles with nodejs 8.