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

Errors while setting up arc-lambda in a clean environment... #49

Open
SF-pliebscher opened this issue Oct 10, 2023 · 2 comments
Open

Errors while setting up arc-lambda in a clean environment... #49

SF-pliebscher opened this issue Oct 10, 2023 · 2 comments

Comments

@SF-pliebscher
Copy link

SF-pliebscher commented Oct 10, 2023

Description
Doc's are incorrect and need to be updated: https://sourcefuse.github.io/arc-docs/arc-iac-docs/modules/arc-lambda/

Several errors are encountered while trying to execute the provided instructions. Installation cannot be completed.

  • Python is a requirement
  • Visual Studio C++ Desktop runtime is required

Steps to Reproduce - Using Visual Studio Code (Windows and WSL Ubuntu)

  1. Follow the instructions at: https://sourcefuse.github.io/arc-docs/arc-iac-docs/modules/arc-lambda/
  2. Step 2 "run npm i" observe the following error:
    ...
    npm ERR! gyp ERR! find Python **********************************************************
    npm ERR! gyp ERR! find Python You need to install the latest version of Python.
    npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
    npm ERR! gyp ERR! find Python you can try one of the following options:
    npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
    npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
    npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
    npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
    npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
    npm ERR! gyp ERR! find Python For more information consult the documentation at:
    npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
    npm ERR! gyp ERR! find Python **********************************************************
    ...
  3. Install latest version of Python...
  4. Choose "Custom installation"
  5. Leave "Optional Features" default
  6. On "Advanced Options" choose:
  • "Install for all users"
  • "Add Python to env. variables"
  1. Click "Install"
  2. In a new terminal, run "run npm i" again and observe the following error:
    ...
    npm ERR! Traceback (most recent call last):
    npm ERR! File "C:\Development\SF\arc-lambda\node_modules\node-gyp\gyp\gyp_main.py", line 42, in
    npm ERR! import gyp # noqa: E402
    npm ERR! ^^^^^^^^^^
    npm ERR! File "C:\Development\SF\arc-lambda\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 9, in
    npm ERR! import gyp.input
    npm ERR! File "C:\Development\SF\arc-lambda\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in
    npm ERR! from distutils.version import StrictVersion
    npm ERR! ModuleNotFoundError: No module named 'distutils'
    ...

NOTE: I also received a "Visual Studio C++ Desktop runtime is required" error, but was unable to reproduce even after uninstalling via the VS 2022 installer so I do not have a stack trace from npm.

Expected behavior
The instructions work.

@SF-pliebscher
Copy link
Author

I resolved the issue by installing python through the windows store. The instructions should be updated at https://sourcefuse.github.io/arc-docs/arc-iac-docs/modules/arc-lambda/

@SF-pliebscher
Copy link
Author

Close issue after doc's are updated.

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

No branches or pull requests

1 participant