I am a relative newbie using node but I am trying to add a module to node with the target being the docker desktop. All is fine before adding the new module.
I am adding supabase javascript library module on my mac terminal at the base dir of my project as follows:
npm install @supabase/supabase-js --no-optional --no-package-lock
That correctly adds this line into the package.json -> “@supabase/supabase-js”: “^2.4.1”,
After clicking the deploy button I get the error below. Clearly the error shows it is missing python but I am not sure what to do about that. I am sure it is obvious after someone mentions a solution but any help would be appreciated.
=> ERROR [5/5] RUN npm install --no-optional --no-package-lock 8.2s
[5/5] RUN npm install --no-optional --no-package-lock:
#0 0.473 npm WARN config optional Use--omit=optional
to exclude optional dependencies, or
#0 0.473 npm WARN config--include=optional
to include them.
#0 0.473 npm WARN config
#0 0.473 npm WARN config Default value does install optional deps unless otherwise omitted.
#0 7.989 npm notice
#0 7.989 npm notice New major version of npm available! 8.19.3 -> 9.3.1
#0 7.989 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.3.1
#0 7.989 npm notice Runnpm install -g npm@9.3.1
to update!
#0 7.989 npm notice
#0 7.990 npm ERR! code 1
#0 7.990 npm ERR! path /opt/node_app/node_modules/bufferutil
#0 7.991 npm ERR! command failed
#0 7.991 npm ERR! command sh -c – node-gyp-build
#0 7.991 npm ERR! gyp info it worked if it ends with ok
#0 7.991 npm ERR! gyp info using node-gyp@9.1.0
#0 7.991 npm ERR! gyp info using node@18.13.0 | linux | arm64
#0 7.991 npm ERR! gyp ERR! find Python
#0 7.991 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#0 7.991 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#0 7.991 npm ERR! gyp ERR! find Python checking if “python3” can be used
#0 7.991 npm ERR! gyp ERR! find Python - “python3” is not in PATH or produced an error
#0 7.991 npm ERR! gyp ERR! find Python checking if “python” can be used
#0 7.991 npm ERR! gyp ERR! find Python - “python” is not in PATH or produced an error
#0 7.991 npm ERR! gyp ERR! find Python
#0 7.991 npm ERR! gyp ERR! find Python **********************************************************
#0 7.991 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#0 7.991 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 7.991 npm ERR! gyp ERR! find Python you can try one of the following options:
#0 7.992 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 7.992 npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
#0 7.992 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#0 7.992 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#0 7.992 npm ERR! gyp ERR! find Python npm config set python “/path/to/pythonexecutable”
#0 7.992 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#0 7.992 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 7.992 npm ERR! gyp ERR! find Python **********************************************************
#0 7.992 npm ERR! gyp ERR! find Python
#0 7.992 npm ERR! gyp ERR! configure error
#0 7.992 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#0 7.992 npm ERR! gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#0 7.992 npm ERR! gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#0 7.992 npm ERR! gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#0 7.992 npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#0 7.992 npm ERR! gyp ERR! stack at exithandler (node:child_process:427:5)
#0 7.992 npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)
#0 7.992 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#0 7.992 npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
#0 7.992 npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
#0 7.992 npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
#0 7.992 npm ERR! gyp ERR! System Linux 5.15.49-linuxkit
#0 7.992 npm ERR! gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
#0 7.992 npm ERR! gyp ERR! cwd /opt/node_app/node_modules/bufferutil
#0 7.992 npm ERR! gyp ERR! node -v v18.13.0
#0 7.992 npm ERR! gyp ERR! node-gyp -v v9.1.0
Last updated: