You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run yarn to set up the repo for contribution, I found that the install failed because a (Python) dependency package distutils was missing when trying to build the binary for node-gyp, one of the project's build dependencies.
Traceback (most recent call last):
File "/Users/kadam/gh/vega/vega/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
import gyp # noqa: E402
^^^^^^^^^^
File "/Users/kadam/gh/vega/vega/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
import gyp.input
File "/Users/kadam/gh/vega/vega/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
I found that running,
python3 -m pip install setuptools
resolved the issue — distutils was deprecated and removed in Python 3.12, but still seems to be needed by this version of node-gyp in order for the Vega repo dependencies to install with yarn.
node-gyp is included in the project as a subdependency of lerna:
I'd suggest either adding a note to the contributing.md with this gotcha, or evaluating an upgrade to lerna v8. node-gyp has resolved the issue internally and I believe lerna 8 has incorporated the updated version.
The text was updated successfully, but these errors were encountered:
Hi @kadamwhite,
Thanks for resolving this issue, as this got me past this point.
However at top level or in the vega-cli package it will now not install/complie/whatever canvas.
If I go into the node-packages/canvas and yarn install, it completes, although with plenty or warnings.
But dependent packages, such as vega-cli, will not build. It seems to think canvas hasn't been built, tries to download it, can't then tries to build it again.
Then I get errors like:
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/canvas-postbuild.node
CXX(target) Release/obj.target/canvas/src/backend/Backend.o
In file included from ../src/backend/Backend.cc:1:
In file included from ../src/backend/Backend.h:6:
../../nan/nan.h:2546:8: error: no matching member function for call to 'SetAccessor'
tpl->SetAccessor(
~~~~~^~~~~~~~~~~
/Users/N/Library/Caches/node-gyp/22.2.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'v8::PropertyAttribute' for 5th argument
void SetAccessor(
^
/Users/N/Library/Caches/node-gyp/22.2.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument
When trying to run
yarn
to set up the repo for contribution, I found that the install failed because a (Python) dependency packagedistutils
was missing when trying to build the binary fornode-gyp
, one of the project's build dependencies.I found that running,
resolved the issue —
distutils
was deprecated and removed in Python 3.12, but still seems to be needed by this version ofnode-gyp
in order for the Vega repo dependencies to install withyarn
.node-gyp
is included in the project as a subdependency oflerna
:I'd suggest either adding a note to the contributing.md with this gotcha, or evaluating an upgrade to lerna v8.
node-gyp
has resolved the issue internally and I believelerna 8
has incorporated the updated version.The text was updated successfully, but these errors were encountered: