asdf-vm / asdf-nodejs

Node.js plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
908 stars 144 forks source link

No preset version installed for command python3.9 #296

Closed mvalitov closed 2 years ago

mvalitov commented 2 years ago

Macbook Air M1 monterey 12.3.1

asdf current python python 2.7.18 /Users/et_samoe/js/frontend/.tool-versions

asdf install nodejs 15.14.0

Downloading node-v15.14.0.tar.gz...
-> https://nodejs.org/dist/v15.14.0/node-v15.14.0.tar.gz

WARNING: node-v15.14.0 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.

Installing node-v15.14.0...

BUILD FAILED (OS X 12.3.1 using node-build 4.9.74-12-g16839e77)

Inspect or clean up the working tree at /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425184321.24510.mZFVPd
Results logged to /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425184321.24510.log

Last 10 log lines:
/var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425184321.24510.mZFVPd/node-v15.14.0 /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425184321.24510.mZFVPd ~/js/frontend
No preset version installed for command python3.9
Please install a version by running one of the following:

asdf install python 2.7.18

or add one of the following versions in your config file at
python 3.9.12
Missing or stale config.gypi, please run ./configure
make: *** [config.gypi] Error 1

asdf local python 3.9.12 asdf current python python 3.9.12 /Users/et_samoe/js/frontend/.tool-versions asdf install nodejs 15.14.0

Trying to update node-build... ok
Downloading node-v15.14.0.tar.gz...
-> https://nodejs.org/dist/v15.14.0/node-v15.14.0.tar.gz

WARNING: node-v15.14.0 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.

Installing node-v15.14.0...

BUILD FAILED (OS X 12.3.1 using node-build 4.9.74-12-g16839e77)

Inspect or clean up the working tree at /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425185735.27130.T39dLV
Results logged to /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425185735.27130.log

Last 10 log lines:
/var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425185735.27130.T39dLV/node-v15.14.0 /var/folders/39/rygwdt1s1w307lkpygr8qv4h0000gn/T/node-build.20220425185735.27130.T39dLV ~/js/-frontend
No preset version installed for command python3.9
Please install a version by running one of the following:

asdf install python 2.7.18

or add one of the following versions in your config file at
python 3.9.12
Missing or stale config.gypi, please run ./configure
make: *** [config.gypi] Error 1

python3.9

Python 3.9.12 (main, Mar 30 2022, 15:57:46)
[Clang 13.1.6 (clang-1316.0.21.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
augustobmoura commented 2 years ago

You just need to configure python3.9 to be the current one. asdf shell python 3.9.12 should set it as the default version for the current shell session.

You can also run asdf global python 3.9.12 for setting it permanently as the default global version

daisylb commented 2 years ago

I am having the same problem, and that solution isn't working 😢

Trying with asdf global python:

❯ asdf current python
python          3.10.4          /Users/daisy/.tool-versions
❯ cd /tmp
❯ asdf current python
python          3.10.4          /Users/daisy/.tool-versions
❯ cd
❯ asdf install nodejs 14.19.1
/Users/daisy/Library/asdf/plugins/nodejs/bin/../lib/utils.sh: line 82: printf: write error: Broken pipe
Trying to update node-build... ok
Downloading node-v14.19.1.tar.gz...
-> https://nodejs.org/dist/v14.19.1/node-v14.19.1.tar.gz

WARNING: node-v14.19.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.

Installing node-v14.19.1...

BUILD FAILED (OS X 12.2 using node-build 4.9.80)

Inspect or clean up the working tree at /tmp/node-build.20220506105211.85064.LeMINS
Results logged to /tmp/node-build.20220506105211.85064.log

Last 10 log lines:
python 3.10.4
python 3.8.13
python 3.9.12
No version is set for command python
Consider adding one of the following versions in your config file at
python 3.10.4
python 3.8.13
python 3.9.12
Missing or stale config.gypi, please run ./configure
make: *** [config.gypi] Error 1

Trying with asdf shell python:

❯ asdf shell python 3.9.12
❯ asdf current python
python          3.9.12          ASDF_PYTHON_VERSION environment variable
❯ asdf install nodejs 14.19.1
/Users/daisy/Library/asdf/plugins/nodejs/bin/../lib/utils.sh: line 82: printf: write error: Broken pipe
Trying to update node-build... ok
Downloading node-v14.19.1.tar.gz...
-> https://nodejs.org/dist/v14.19.1/node-v14.19.1.tar.gz

WARNING: node-v14.19.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.

Installing node-v14.19.1...

BUILD FAILED (OS X 12.2 using node-build 4.9.80)

Inspect or clean up the working tree at /tmp/node-build.20220506105102.81935.YflWUY
Results logged to /tmp/node-build.20220506105102.81935.log

Last 10 log lines:
python 3.10.4
python 3.8.13
python 3.9.12
No version is set for command python
Consider adding one of the following versions in your config file at
python 3.10.4
python 3.8.13
python 3.9.12
Missing or stale config.gypi, please run ./configure
make: *** [config.gypi] Error 1
dhsl commented 1 year ago

I have the same issue trying to install node 14. It looks for python3.10, finds the shim but returns:

No preset version installed for command python3.10
Please install a version by running one of the following:

asdf install python 3.11.6
asdf install python 2.7.18

or add one of the following versions in your config file at /Users/<user>/.tool-versions
python 3.10.13

EDIT: The correct solution is to run asdf global python 3.11.6 2.7.18 3.10.13 or to add it to /Users/<user>/.tool-versions manually, just as it tells me.