Skip to content

node-gyp on macos fails in e2e tests #909

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

Closed
jvalkeal opened this issue Nov 3, 2023 · 3 comments · Fixed by #1095
Closed

node-gyp on macos fails in e2e tests #909

jvalkeal opened this issue Nov 3, 2023 · 3 comments · Fixed by #1095
Milestone

Comments

@jvalkeal
Copy link
Contributor

jvalkeal commented Nov 3, 2023

At least macos11 env is now erroring:

npm ERR! Traceback (most recent call last):
npm ERR!   File "/Users/runner/work/spring-shell/spring-shell/e2e/spring-shell-e2e/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm ERR!     import gyp  # noqa: E402
npm ERR!     ^^^^^^^^^^
npm ERR!   File "/Users/runner/work/spring-shell/spring-shell/e2e/spring-shell-e2e/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm ERR!     import gyp.input
npm ERR!   File "/Users/runner/work/spring-shell/spring-shell/e2e/spring-shell-e2e/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
npm ERR!     from distutils.version import StrictVersion
npm ERR! ModuleNotFoundError: No module named 'distutils'

Looks like runners envs are upgrading to python 3.12 and that distutils were removed in that version.

@jvalkeal
Copy link
Contributor Author

jvalkeal commented Nov 7, 2023

Looks to be from node, not directly from node-pty. There's starting to be issues in https://github.com/nodejs/node-gyp about distutils as people see these type of failures on gh actions.

@jvalkeal jvalkeal changed the title Upgrade node-pty in e2e tests node-gyp on macos fails in e2e tests Nov 7, 2023
jvalkeal added a commit that referenced this issue Nov 7, 2023
jvalkeal added a commit that referenced this issue Nov 7, 2023
jvalkeal added a commit that referenced this issue Nov 7, 2023
@psaint-j
Copy link

psaint-j commented Apr 9, 2024

Hello, I have the same issue. How did you solve the problem?

@codespearhead
Copy link
Contributor

codespearhead commented Jun 25, 2024

@psaint-j You have to install setuptools as per issue electron/rebuild#1116 .

A permanent solution is to upgrade to node-gyp to v10+ and revert 8097f1e , or even better: bump node-pyt #921 to get rid of this dependency altogether.

@fmbenhassine fmbenhassine added this to the 3.4.1 milestone Apr 25, 2025
therepanic pushed a commit to therepanic/spring-shell that referenced this issue May 7, 2025
- Bump node-pty from 0.11.0-beta19 to 1.0.0
- Bump xterm-headless from 4.18.0 to 5.5.0
- Rename xterm-headless to @xterm/headless as per https://www.npmjs.com/package/xterm-headless
- Unpin Python 3.11 in e2e test by reverting commit spring-projects@8097f1e because it's no longer necessary as explained in spring-projects#909 (comment)

- Fixes spring-projects#909
- Fixes spring-projects#921

Signed-off-by: Andrey Litvitski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants