Support for Node.js 12.x
See original GitHub issueNode-rdkafka 2.6.1 does not build with Node.js 12 under Debian 9.
Example output:
from /home/node/.node-gyp/12.0.0/include/node/v8.h:25,
from /home/node/.node-gyp/12.0.0/include/node/node.h:63,
from ../node_modules/nan/nan.h:53,
from /home/node/.npm/lib/node_modules/node-rdkafka/src/common.h:13,
from ../src/common.cc:13:
/home/node/.node-gyp/12.0.0/include/node/v8.h:3416:55: note: declared here
V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index));
^
/home/node/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/common.cc:516:31: warning: comparison between ‘enum rd_kafka_resp_err_t’ and ‘enum RdKafka::ErrorCode’ [-Wenum-compare]
if (err != RdKafka::ERR_NO_ERROR) {
^~~~~~~~~~~~
node-librdkafka.target.mk:126: recipe for target 'Release/obj.target/node-librdkafka/src/common.o' failed
rm 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate
make: Leaving directory '/home/node/.npm/lib/node_modules/node-rdkafka/build'
make: *** [Release/obj.target/node-librdkafka/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/node/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 4.14.88-coreos
gyp ERR! command "/home/node/nodejs/bin/node" "/home/node/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node/.npm/lib/node_modules/node-rdkafka
gyp ERR! node -v v12.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-rdkafka@2.6.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-rdkafka@2.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2019-04-24T06_32_28_180Z-debug.log
Example (simplified) Dockerfile:
FROM debian:stretch
RUN groupadd --gid 3333 node \
&& useradd --uid 3333 --gid node --shell /bin/bash --create-home node
ENV TERM=xterm
RUN apt-get update && apt-get install sudo && echo "node ALL=(ALL) NOPASSWD:/usr/bin/apt-get,/usr/bin/dpkg,/bin/rm" >> /etc/sudoers
USER node
ENV NODE_VERSION=12.0.0
ENV PATH="${PATH}:/home/node/.npm/bin:/home/node/nodejs/bin"
ENV NODE_PATH="/home/node/.npm/lib/node_modules"
RUN sudo apt-get install -y --no-install-recommends xz-utils curl ca-certificates \
&& mkdir /home/node/node_modules \
&& NODEJS_NAME="node-v${NODE_VERSION}-linux-x64" \
&& NODEJS_TAR="${NODEJS_NAME}.tar.xz" \
&& cd /home/node && curl "https://nodejs.org/dist/v${NODE_VERSION}/${NODEJS_NAME}.tar.xz" -o "/home/node/${NODEJS_TAR}" \
&& tar xf ${NODEJS_TAR} \
&& mv "${NODEJS_NAME}" nodejs \
&& rm "${NODEJS_TAR}" \
&& npm config set prefix "/home/node/.npm" \
&& npm i -g yarn
RUN sudo dpkg -l > /tmp/packages-before.txt \
&& sudo apt-get install -y --no-install-recommends \
python \
librdkafka-dev librdkafka++1 librdkafka1 \
libssl1.0-dev liblz4-dev libsasl2-dev \
libpthread-stubs0-dev \
gcc g++ make build-essential pkg-config \
git-core \
ca-certificates \
curl \
less \
nano \
netcat \
ssh-client \
tcpdump \
vim \
netcat \
net-tools \
libpq-dev libpq5 \
&& npm install -y -g node-gyp
RUN npm install -y -g node-rdkafka@2.6.1 \
&& npm install -y -g pg-native@3.0.0 \
&& sudo apt-get remove -y \
gcc g++ make pkg-config xz-utils \
binutils cpp cpp-6 dpkg-dev g++-6 gcc-6 libasan3 libatomic1 \
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libgcc-6-dev \
libglib2.0-0 libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpfr4 \
libmpx2 libquadmath0 libstdc++-6-dev libtsan0 libubsan0 linux-libc-dev \
libsasl2-dev libpthread-stubs0-dev liblz4-dev \
librdkafka-dev libssl1.0-dev \
&& sudo apt-get install --no-install-recommends -y libgomp1 \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean \
&& sudo dpkg -l > /tmp/packages-after.txt \
&& sudo rm -rf /var/lib/apt/lists/*
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Announcing the end of support for Node.js 12.x in the AWS ...
Starting November 1, 2022, AWS SDK For JavaScript (v3) will no longer support Node.js 12.x which was EOL on April 30, 2022.
Read more >Node.js - endoflife.date
Release Released Active Support Se...
19 2 months and 1 week ago. (18 Oct 2022) Ends in 3 months. (01 Apr 2023) En...
18 (...
Read more >AWS Lambda ending support for node.js 12 #87 - GitHub
js 12 runtime used by Lambda functions, and functions using Node.js 12 will no longer be eligible for technical support. In addition, you...
Read more >Node v12.22.12 (LTS)
js 12 release. Node.js 12 will reach End-of-Life status on 30 April 2022, after which it will no receive updates. You are strongly...
Read more >Identify AWS Lambda Functions Running Node.js 12 with ...
Beginning November 14, 2022 AWS will no longer provide security updates or technical support for the Node.js 12 runtime used by Lambda functions ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Quickfixed version (WIP): https://github.com/lrecknagel/node-rdkafka
Bulding node-rdkafka@2.6.1 on macOS 10.14.4, Xcode 10.2 and node v12.1.0 I get:
full output below: