When running "docker-compose up" the startup is failing when building node.
It appears that the issue is occurring when the node dockerfile is trying to run:
RUN yarn --cwd /opt/django-project install --frozen-lockfile
I am getting the following error:
Step 5/6 : RUN yarn --cwd /opt/django-project install --frozen-lockfile
---> Running in 62fff18f4b9a
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /opt/django-project/node_modules/lmdb: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /opt/django-project/node_modules/lmdb
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@20.0.0 | linux | x64
gyp info find Python using Python version 3.10.11 found at "/usr/bin/python3"
gyp http GET https://unofficial-builds.nodejs.org/download/release/v20.0.0/node-v20.0.0-headers.tar.gz
gyp http 200 https://unofficial-builds.nodejs.org/download/release/v20.0.0/node-v20.0.0-headers.tar.gz
gyp http GET https://unofficial-builds.nodejs.org/download/release/v20.0.0/SHASUMS256.txt
gyp http 200 https://unofficial-builds.nodejs.org/download/release/v20.0.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/django-project/node_modules/lmdb/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/20.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.0.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/opt/django-project/node_modules/lmdb',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/opt/django-project/node_modules/lmdb/build'
CXX(target) Release/obj.target/lmdb/src/lmdb-js.o
In file included from ../../nan/nan.h:178,
from ../src/lmdb-js.h:32,
from ../src/lmdb-js.cpp:1:
../../nan/nan_callbacks.h:55:23: error: 'AccessorSignature' is not a member of 'v8'
55 | typedef v8::Localv8::AccessorSignature Sig;
| ^~~~~~~~~~~~~~~~~
../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
55 | typedef v8::Localv8::AccessorSignature Sig;
| ^
../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../nan/nan.h:684:63: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
684 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
685 | idle_time_in_ms * 0.001);
| ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.cache/node-gyp/20.0.0/include/node/v8-initialization.h:13,
from /root/.cache/node-gyp/20.0.0/include/node/v8.h:34,
from ../src/lmdb-js.h:29:
/root/.cache/node-gyp/20.0.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h: In function 'void Nan::SetAccessor(v8::Localv8::ObjectTemplate, v8::Localv8::String, GetterCallback, SetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, imp::Sig)':
../../nan/nan.h:2544:19: error: no matching function for call to 'v8::ObjectTemplate::SetAccessor(v8::Localv8::String&, void (&)(v8::Localv8::Name, const v8::PropertyCallbackInfov8::Value&), void (&)(v8::Localv8::Name, v8::Localv8::Value, const v8::PropertyCallbackInfo&), v8::Localv8::Object&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)'
2544 | tpl->SetAccessor(
| ~~~~~~~~~~~~~~~~^
2545 | name
| ~~~~
2546 | , getter_
| ~~~~~~~~~
2547 | , setter_
| ~~~~~~~~~
2548 | , obj
| ~~~~~
2549 | , settings
| ~~~~~~~~~~
2550 | , attribute
| ~~~~~~~~~~~
2551 | , signature);
| ~~~~~~~~~~~~
In file included from /root/.cache/node-gyp/20.0.0/include/node/v8-function.h:15,
from /root/.cache/node-gyp/20.0.0/include/node/v8.h:33:
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:809:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::String, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
809 | void SetAccessor(
| ^~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:816:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::Name, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
816 | void SetAccessor(
| ^~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [lmdb.target.mk:152: Release/obj.target/lmdb/src/lmdb-js.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack at ChildProcess.emit (node:events:511:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Linux 3.10.0-1160.76.1.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/django-project/node_modules/lmdb
gyp ERR! node -v v20.0.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok
make: Leaving directory '/opt/django-project/node_modules/lmdb/build'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Service 'node' failed to build: The command '/bin/sh -c yarn --cwd /opt/django-project install --frozen-lockfile' returned a non-zero code: 1
When running "docker-compose up" the startup is failing when building node.
It appears that the issue is occurring when the node dockerfile is trying to run:
RUN yarn --cwd /opt/django-project install --frozen-lockfile
I am getting the following error:
Step 5/6 : RUN yarn --cwd /opt/django-project install --frozen-lockfile
---> Running in 62fff18f4b9a
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /opt/django-project/node_modules/lmdb: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /opt/django-project/node_modules/lmdb
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@20.0.0 | linux | x64
gyp info find Python using Python version 3.10.11 found at "/usr/bin/python3"
gyp http GET https://unofficial-builds.nodejs.org/download/release/v20.0.0/node-v20.0.0-headers.tar.gz
gyp http 200 https://unofficial-builds.nodejs.org/download/release/v20.0.0/node-v20.0.0-headers.tar.gz
gyp http GET https://unofficial-builds.nodejs.org/download/release/v20.0.0/SHASUMS256.txt
gyp http 200 https://unofficial-builds.nodejs.org/download/release/v20.0.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/django-project/node_modules/lmdb/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/20.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.0.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/opt/django-project/node_modules/lmdb',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/opt/django-project/node_modules/lmdb/build'
CXX(target) Release/obj.target/lmdb/src/lmdb-js.o
In file included from ../../nan/nan.h:178,
from ../src/lmdb-js.h:32,
from ../src/lmdb-js.cpp:1:
../../nan/nan_callbacks.h:55:23: error: 'AccessorSignature' is not a member of 'v8'
55 | typedef v8::Localv8::AccessorSignature Sig;
| ^~~~~~~~~~~~~~~~~
../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
55 | typedef v8::Localv8::AccessorSignature Sig;
| ^
../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../nan/nan.h:684:63: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
684 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
685 | idle_time_in_ms * 0.001);
| ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.cache/node-gyp/20.0.0/include/node/v8-initialization.h:13,
from /root/.cache/node-gyp/20.0.0/include/node/v8.h:34,
from ../src/lmdb-js.h:29:
/root/.cache/node-gyp/20.0.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h: In function 'void Nan::SetAccessor(v8::Localv8::ObjectTemplate, v8::Localv8::String, GetterCallback, SetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, imp::Sig)':
../../nan/nan.h:2544:19: error: no matching function for call to 'v8::ObjectTemplate::SetAccessor(v8::Localv8::String&, void (&)(v8::Localv8::Name, const v8::PropertyCallbackInfov8::Value&), void (&)(v8::Localv8::Name, v8::Localv8::Value, const v8::PropertyCallbackInfo&), v8::Localv8::Object&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)'
2544 | tpl->SetAccessor(
| ~~~~~~~~~~~~~~~~^
2545 | name
| ~~~~
2546 | , getter_
| ~~~~~~~~~
2547 | , setter_
| ~~~~~~~~~
2548 | , obj
| ~~~~~
2549 | , settings
| ~~~~~~~~~~
2550 | , attribute
| ~~~~~~~~~~~
2551 | , signature);
| ~~~~~~~~~~~~
In file included from /root/.cache/node-gyp/20.0.0/include/node/v8-function.h:15,
from /root/.cache/node-gyp/20.0.0/include/node/v8.h:33:
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:809:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::String, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
809 | void SetAccessor(
| ^~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:816:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::Name, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Localv8::Value, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
816 | void SetAccessor(
| ^~~~~~~~~~~
/root/.cache/node-gyp/20.0.0/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [lmdb.target.mk:152: Release/obj.target/lmdb/src/lmdb-js.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:
makefailed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack at ChildProcess.emit (node:events:511:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Linux 3.10.0-1160.76.1.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/django-project/node_modules/lmdb
gyp ERR! node -v v20.0.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok
make: Leaving directory '/opt/django-project/node_modules/lmdb/build'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Service 'node' failed to build: The command '/bin/sh -c yarn --cwd /opt/django-project install --frozen-lockfile' returned a non-zero code: 1