Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macos source build node-gyp error on yarn install #6026

Closed
manylov opened this issue Oct 6, 2023 · 3 comments
Closed

Macos source build node-gyp error on yarn install #6026

manylov opened this issue Oct 6, 2023 · 3 comments
Labels
meta-bug Issues that identify a bug and require a fix.

Comments

@manylov
Copy link

manylov commented Oct 6, 2023

Describe the bug

Can not yarn install on macos

got error:

Traceback (most recent call last):
  File "/Users/maksimmanylov/casper/light-clients/lodestar/lodestar/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    import gyp  # noqa: E402
    ^^^^^^^^^^
  File "/Users/maksimmanylov/casper/light-clients/lodestar/lodestar/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    import gyp.input
  File "/Users/maksimmanylov/casper/light-clients/lodestar/lodestar/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'

Seems like node-gyp related issue
nodejs/node-gyp#2888

It blocks development on macOs, are there any ways to fix it? node-gyp fix process looks slow.

Expected behavior

no errors

Steps to reproduce

git clone on macos
yarn install

Additional context

No response

Operating system

macOS

Lodestar version or commit hash

latest

@manylov manylov added the meta-bug Issues that identify a bug and require a fix. label Oct 6, 2023
@matthewkeil
Copy link
Member

I installed python 3.12 and the error is as you mentioned. The official release for 3.12 was just on Oct 2 so its probably not officially supported by node-gyp yet. I am on 3.11 and everything installs smoothly. I can definitely recommend downgrading your python to 3.11 until that bug gets patched.

@wemeetagain
Copy link
Member

We no longer use node-gyp, and should get rid of it from our devDependencies

@philknows
Copy link
Member

Closing for #7193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-bug Issues that identify a bug and require a fix.
Projects
None yet
Development

No branches or pull requests

4 participants