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

error of 'Containerize an application' #326

Open
first-coding opened this issue Dec 5, 2022 · 13 comments
Open

error of 'Containerize an application' #326

first-coding opened this issue Dec 5, 2022 · 13 comments

Comments

@first-coding
Copy link

As a beginner of docker,I followed the tutorials on the official website and found that there was a mistake which i could not solve by myself.please teach me how to solve this prolem,thank you .
The following is the error report.

=> ERROR [4/4] RUN yarn install --production 225.4s

[4/4] RUN yarn install --production:
#9 0.564 yarn install v1.22.19
#9 0.646 [1/4] Resolving packages...
#9 0.886 [2/4] Fetching packages...
#9 223.7 [3/4] Linking dependencies...
#9 224.7 [4/4] Building fresh packages...
#9 225.3 error /app/node_modules/sqlite3: Command failed.
#9 225.3 Exit code: 1
#9 225.3 Command: node-pre-gyp install --fallback-to-build
#9 225.3 Arguments:
#9 225.3 Directory: /app/node_modules/sqlite3
#9 225.3 Output:
#9 225.3 node-pre-gyp info it worked if it ends with ok
#9 225.3 node-pre-gyp info using [email protected]
#9 225.3 node-pre-gyp info using [email protected] | linux | x64
#9 225.3 node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" (not found)
#9 225.3 node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz
#9 225.3 node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ECONNREFUSED 127.0.0.1:443
#9 225.3 node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp)
#9 225.3 node-pre-gyp WARN Hit error request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ECONNREFUSED 127.0.0.1:443
#9 225.3 gyp info it worked if it ends with ok
#9 225.3 gyp info using [email protected]
#9 225.3 gyp info using [email protected] | linux | x64
#9 225.3 gyp info ok
#9 225.3 gyp info it worked if it ends with ok
#9 225.3 gyp info using [email protected]
#9 225.3 gyp info using [email protected] | linux | x64
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! find Python Python is not set from command line or npm configuration
#9 225.3 gyp ERR! find Python Python is not set from environment variable PYTHON
#9 225.3 gyp ERR! find Python checking if "python3" can be used
#9 225.3 gyp ERR! find Python - "python3" is not in PATH or produced an error
#9 225.3 gyp ERR! find Python checking if "python" can be used
#9 225.3 gyp ERR! find Python - "python" is not in PATH or produced an error
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! find Python **********************************************************
#9 225.3 gyp ERR! find Python You need to install the latest version of Python.
#9 225.3 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#9 225.3 gyp ERR! find Python you can try one of the following options:
#9 225.3 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#9 225.3 gyp ERR! find Python (accepted by both node-gyp and npm)
#9 225.3 gyp ERR! find Python - Set the environment variable PYTHON
#9 225.3 gyp ERR! find Python - Set the npm configuration variable python:
#9 225.3 gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#9 225.3 gyp ERR! find Python For more information consult the documentation at:
#9 225.3 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#9 225.3 gyp ERR! find Python **********************************************************
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! configure error
#9 225.3 gyp ERR! stack Error: Could not find any Python installation to use
#9 225.3 gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47)
#9 225.3 gyp ERR! stack at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21)
#9 225.3 gyp ERR! stack at PythonFinder. (/app/node_modules/node-gyp/lib/find-python.js:202:16)
#9 225.3 gyp ERR! stack at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16)
#9 225.3 gyp ERR! stack at exithandler (node:child_process:420:5)
#9 225.3 gyp ERR! stack at ChildProcess.errorhandler (node:child_process:432:5)
#9 225.3 gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#9 225.3 gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
#9 225.3 gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
#9 225.3 gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
#9 225.3 gyp ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
#9 225.3 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
#9 225.3 gyp ERR! cwd /app/node_modules/sqlite3
#9 225.3 gyp ERR! node -v v18.12.1
#9 225.3 gyp ERR! node-gyp -v v8.4.1
#9 225.3 gyp ERR! not ok
#9 225.3 node-pre-gyp ERR! build error
#9 225.3 node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#9 225.3 node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
#9 225.3 node-pre-gyp ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
#9 225.3 node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#9 225.3 node-pre-gyp ERR! cwd /app/node_modules/sqlite3
#9 225.3 node-pre-gyp ERR! node -v v18.12.1
#9 225.3 node-pre-gyp ERR! node-pre-gyp -v v1.0.10
#9 225.3 node-pre-gyp ERR! not ok
#9 225.3 Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#9 225.3 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


executor failed running [/bin/sh -c yarn install --production]: exit code: 1

@mikesir87
Copy link
Member

mikesir87 commented Dec 5, 2022

Hello there and thanks for opening an issue. A couple of quick questions before jumping in...

  • What operating system are you using Docker with? Mac? Windows? Linux?
  • If you're on a Mac, are you using an Intel chip or Apple Silicon?
  • How are you accessing the getting started tutorial? Are you viewing it on docs.docker.com or running the Getting Started container on your local machine and viewing the docs through localhost?

We recently did some updates to the tutorial that should have prevented this issue, but apparently not! So, trying to understand where it might be coming from. 😄

@first-coding
Copy link
Author

Thanks for your reply.

  • My operating system is Windows.
  • Intel chip.
  • I went to docs.docker.com to see the tutorial.

@musaib072
Copy link

@first-coding the error shows you have not installed python . make sure to install the correct version needed if you are installing from python website make sure to include in Path

@mikesir87
Copy link
Member

Hmmm... you shouldn't need Python anymore, now that we made a few other updates. I'll do some digging on it tomorrow to see what if I can figure out what's going on.

@first-coding
Copy link
Author

@musaib072 I have installed python and include it in path.

@mikesir87
Copy link
Member

Installing Python and having it on your path on your machine doesn't help fix the problem during an image build, as no host binaries are leveraged during a container build. Only the things installed the container are accessible.

@bigwookiee
Copy link

I have the same issue with the same setup. Has there been any movement on this?

@mikesir87
Copy link
Member

@bigwookiee - can you share some more details so we can better try and nail this down? What error are you seeing? What OS/setup are you working on?

@bigwookiee
Copy link

bigwookiee commented Jan 10, 2023

Windows 10
Intell i7

The computer meets all the minimum specifications. I am behind a proxy firewall, and I also had an issue with GitLab throwing an unknown SSL error when running it from PowerShell. Docker Desktop did not give me any problems when it ran its small demo, including the git commands it looked like it was executing.

PS C:\Users\\workspace\GitHub\getting-started> cd app
PS C:\Users\\workspace\GitHub\getting-started\app> docker build -t getting-started .
[+] Building 22.9s (13/13) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 32B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                         2.2s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ce  0.0s
 => [internal] load build definition from Dockerfile                                                               0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                  2.1s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 4.62MB                                                                                0.0s
 => [1/5] FROM docker.io/library/node:18-alpine@sha256:fda98168118e5a8f4269efca4101ee51dd5c75c0fe56d8eb6fad80455c  0.0s
 => CACHED [2/5] WORKDIR /app                                                                                      0.0s
 => [3/5] COPY . .                                                                                                 0.0s
 => [4/5] RUN yarn config set "strict-ssl" false -g                                                                0.5s
 => ERROR [5/5] RUN yarn install --production                                                                     17.8s
------
 > [5/5] RUN yarn install --production:
#13 0.603 yarn install v1.22.19
#13 0.653 [1/4] Resolving packages...
#13 0.784 [2/4] Fetching packages...
#13 15.93 [3/4] Linking dependencies...
#13 16.63 [4/4] Building fresh packages...
#13 17.55 error /app/node_modules/sqlite3: Command failed.
#13 17.55 Exit code: 1
#13 17.55 Command: node-pre-gyp install --fallback-to-build
#13 17.55 Arguments:
#13 17.55 Directory: /app/node_modules/sqlite3
#13 17.55 Output:
#13 17.55 node-pre-gyp info it worked if it ends with ok
#13 17.55 node-pre-gyp info using [email protected]
#13 17.55 node-pre-gyp info using [email protected] | linux | x64
#13 17.55 node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" (not found)
#13 17.55 node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz
#13 17.55 node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: self-signed certificate in certificate chain
#13 17.55 node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp)
#13 17.55 node-pre-gyp WARN Hit error request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: self-signed certificate in certificate chain
#13 17.55 gyp info it worked if it ends with ok
#13 17.55 gyp info using [email protected]
#13 17.55 gyp info using [email protected] | linux | x64
#13 17.55 gyp info ok
#13 17.55 gyp info it worked if it ends with ok
#13 17.55 gyp info using [email protected]
#13 17.55 gyp info using [email protected] | linux | x64
#13 17.55 gyp ERR! find Python
#13 17.55 gyp ERR! find Python Python is not set from command line or npm configuration
#13 17.55 gyp ERR! find Python Python is not set from environment variable PYTHON
#13 17.55 gyp ERR! find Python checking if "python3" can be used
#13 17.55 gyp ERR! find Python - "python3" is not in PATH or produced an error
#13 17.55 gyp ERR! find Python checking if "python" can be used
#13 17.55 gyp ERR! find Python - "python" is not in PATH or produced an error
#13 17.55 gyp ERR! find Python
#13 17.55 gyp ERR! find Python **********************************************************
#13 17.55 gyp ERR! find Python You need to install the latest version of Python.
#13 17.55 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#13 17.55 gyp ERR! find Python you can try one of the following options:
#13 17.55 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#13 17.55 gyp ERR! find Python   (accepted by both node-gyp and npm)
#13 17.55 gyp ERR! find Python - Set the environment variable PYTHON
#13 17.55 gyp ERR! find Python - Set the npm configuration variable python:
#13 17.55 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#13 17.55 gyp ERR! find Python For more information consult the documentation at:
#13 17.55 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#13 17.55 gyp ERR! find Python **********************************************************
#13 17.55 gyp ERR! find Python
#13 17.55 gyp ERR! configure error
#13 17.55 gyp ERR! stack Error: Could not find any Python installation to use
#13 17.55 gyp ERR! stack     at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47)
#13 17.55 gyp ERR! stack     at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21)
#13 17.55 gyp ERR! stack     at PythonFinder.<anonymous> (/app/node_modules/node-gyp/lib/find-python.js:202:16)
#13 17.55 gyp ERR! stack     at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16)
#13 17.55 gyp ERR! stack     at exithandler (node:child_process:427:5)
#13 17.55 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:439:5)
#13 17.55 gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#13 17.55 gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:289:12)
#13 17.55 gyp ERR! stack     at onErrorNT (node:internal/child_process:476:16)
#13 17.55 gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
#13 17.55 gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
#13 17.55 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
#13 17.55 gyp ERR! cwd /app/node_modules/sqlite3
#13 17.55 gyp ERR! node -v v18.13.0
#13 17.55 gyp ERR! node-gyp -v v8.4.1
#13 17.55 gyp ERR! not ok
#13 17.55 node-pre-gyp ERR! build error
#13 17.55 node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#13 17.55 node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#13 17.55 node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#13 17.55 node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
#13 17.55 node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
#13 17.55 node-pre-gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
#13 17.55 node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#13 17.55 node-pre-gyp ERR! cwd /app/node_modules/sqlite3
#13 17.55 node-pre-gyp ERR! node -v v18.13.0
#13 17.55 node-pre-gyp ERR! node-pre-gyp -v v1.0.10
#13 17.55 node-pre-gyp ERR! not ok
#13 17.55 Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#13 17.55 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn install --production]: exit code: 1

@ktaeho22
Copy link

ktaeho22 commented Jan 24, 2023

Hello Windows 10/Intel chip user here.

I also had a problem, but it seems like it was the problem with alpine not recognizing python + Node 18 does not work well with sqlite3 version 4.1.0

I lowered the node version to 14 from 18, and added python3 to fixed it as mentioned in
TryGhost/node-sqlite3#1556

Code that worked:

FROM node:14-alpine
RUN apk add --no-cache --update python3 make g++
RUN ln -s $(which python3) /usr/local/bin/python
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]

@StephenC-ahh
Copy link

I encountered a similar error and after much testing determined that it's not python but the installation of SQlite3. I fixed by lowering the sqlite dependency to version 5.0.0 in the package.json file

"dependencies": {
    "sqlite3": "5.0.0",

This got the ToDo app up & running

@remain-happy
Copy link

I have the same issue I think. I am using WSL2 on windows11_22H2 and CPU 12th Gen Intel(R) Core(TM) i7-12700H. I follow Build the app's image

docker build -t getting-started .

it posts an error report

(base) yfwu@TopGun:~/getting-started-app$ docker build -t getting-started .
failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-buildx: no such file or directory

DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/

Sending build context to Docker daemon 6.503MB
Step 1/6 : FROM node:18-alpine
---> 50c7e33a9de1
Step 2/6 : WORKDIR /app
---> Using cache
---> 9ffa0e18158c
Step 3/6 : COPY . .
---> Using cache
---> 06c55f19b2b2
Step 4/6 : RUN yarn install --production
---> Running in 704e9ccab761
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /app/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /app/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz
node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ETIMEDOUT 20.205.243.166:443
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ETIMEDOUT 20.205.243.166:443
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21)
gyp ERR! stack at PythonFinder. (/app/node_modules/node-gyp/lib/find-python.js:202:16)
gyp ERR! stack at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16)
gyp ERR! stack at exithandler (node:child_process:427:5)
gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)
gyp ERR! stack at ChildProcess.emit (node:events:514:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
gyp ERR! System Linux 5.15.90.1-microsoft-standard-WSL2
gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd /app/node_modules/sqlite3
gyp ERR! node -v v18.17.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=9 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:514:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Linux 5.15.90.1-microsoft-standard-WSL2
node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /app/node_modules/sqlite3
node-pre-gyp ERR! node -v v18.17.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=9 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@zxy13927069542
Copy link

I encountered a similar error and after much testing determined that it's not python but the installation of SQlite3. I fixed by lowering the sqlite dependency to version 5.0.0 in the package.json file

"dependencies": {
    "sqlite3": "5.0.0",

This got the ToDo app up & running

great!

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

8 participants