socketcluster icon indicating copy to clipboard operation
socketcluster copied to clipboard

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

Open Jerar opened this issue 6 years ago • 4 comments

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 ?

Jerar avatar Nov 05 '18 13:11 Jerar

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 avatar Nov 08 '18 17:11 happilymarrieddad

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....

happilymarrieddad avatar Nov 08 '18 17:11 happilymarrieddad

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

Jerar avatar Nov 09 '18 06:11 Jerar

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

vasild avatar Sep 16 '19 15:09 vasild