-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Installing electron on MacOS Catalina #2257
Comments
Upgrade node-gyp https://github.com/nodejs/node-gyp/blob/master/gyp/pylib/gyp/xcode_emulation.py#L1527 is a comment, not code. |
The project in question is a fork of a dependency maintained by someone at Signal. https://github.com/signalapp/Signal-Desktop/tree/89d5972522a555723034b59f9fe20afdbd120eb8 has the node engine set to 12.13.0 so I'm set using what they expect.
|
In case you wanted to see what the actual code is, https://github.com/nodejs/node-gyp/blob/v5.0.4/gyp/pylib/gyp/xcode_emulation.py#L1527 is what gets used when you set your project's node engine to 12.13.0 |
A shebang allows the author to specify a python dependency when it's known that a specific version of a scripting language is needed to run the script properly. Without it, the user's current interpreter is used, which in a lot of cases today is python3. |
Yes. Because Python 2 died on 1/1/2020. |
It might make more sense to ship these scripts with a shebang pointing to |
Please stop. We have discussed have 5 different ways to solve your problem of using code that is no longer supported. Shebang lines are only useful in files that are meant to be executed in a standalone fashion. If this file is executed in a standalone fashion then nothing will happen because this file contains functions and classes that are called from other files. It is not useful or customary to add a shebang to such files. The current node-gyp is perfectly compatible with Node.js v12.13.0 and with Python 3.9 so if you choose not to upgrade, please do not create issues that assert that it is a necessity to move backwards. |
node-gyp/gyp/pylib/gyp/xcode_emulation.py
Lines 1 to 8 in 66c0f04
If this were replaced with this, it should work.
+#!/usr/bin/python2.7 # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """
I fixed it locally by running
PYENV_VERSION=system npm i
while looking into this in a related issue elsewhere. Here's a relevant section of my stacktrace that brought me here.The text was updated successfully, but these errors were encountered: