theohbrothers / docker-code-server

Dockerized code-server 🐳

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`alpine:3.17` nodejs version breaking builds

leojonathanoh opened this issue · comments

commented

Bug

alpine:3.17 nodejs version breaking builds

Expectation

alpine:3.17 nodejs version not breaking builds

Discussion

Successful build 2 weeks ago:

#12 3.831 (27/29) Installing nodejs (18.19.1-r0)
#12 4.038 (28/29) Purging nodejs-current (19.7.0-r0)

Failed build today, installing kerberos fails, after alpine:3.17 updated its nodejs package:

#12 3.935 (27/29) Installing nodejs (18.20.1-r0)
#12 4.154 (28/29) Purging nodejs-current (19.7.0-r0)

# Installing code-server
#12 25.01 npm ERR! npm ERR! In file included from ../node_modules/node-addon-api/napi.h:3189,
#12 25.01 npm ERR! npm ERR!                  from ../src/kerberos.h:11,
#12 25.01 npm ERR! npm ERR!                  from ../src/kerberos.cc:1:
#12 25.01 npm ERR! npm ERR! ../node_modules/node-addon-api/napi-inl.h: In instantiation of 'Napi::ObjectWrap<T>::ObjectWrap(const Napi::CallbackInfo&) [with T = node_kerberos::KerberosClient]':
#12 25.01 npm ERR! npm ERR! ../src/kerberos.cc:64:22:   required from here
#12 25.01 npm ERR! npm ERR! ../node_modules/node-addon-api/napi-inl.h:4414:21: error: invalid conversion from 'void (*)(napi_env, void*, void*)' {aka 'void (*)(napi_env__*, void*, void*)'} to 'node_api_nogc_finalize' {aka 'void (*)(const napi_env__*, void*, void*)'} [-fpermissive]
#12 25.01 npm ERR! npm ERR!  4414 |   status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref);
#12 25.01 npm ERR! npm ERR!       |            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#12 25.01 npm ERR! npm ERR!       |                     |
#12 25.01 npm ERR! npm ERR!       |                     void (*)(napi_env, void*, void*) {aka void (*)(napi_env__*, void*, void*)}
#12 25.01 npm ERR! npm ERR! In file included from /root/.cache/node-gyp/18.20.1/include/node/node_api.h:12,
#12 25.01 npm ERR! npm ERR!                  from ../node_modules/node-addon-api/napi.h:13:
#12 25.01 npm ERR! npm ERR! /root/.cache/node-gyp/18.20.1/include/node/js_native_api.h:317:69: note:   initializing argument 4 of 'napi_status napi_wrap(napi_env, napi_value, void*, node_api_nogc_finalize, void*, napi_ref__**)'
#12 25.01 npm ERR! npm ERR!   317 |                                              node_api_nogc_finalize finalize_cb,
#12 25.01 npm ERR! npm ERR!       |                                              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

npm install kerberos reproduces the error.

See nodejs/node#52229, where node 20.12 and 18.20 are affected by this breaking change.