Skip to content

M1 Preview, error during tutorial: node:12-alpine missing python #5176

@rfugal

Description

@rfugal
  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

I installed the M1 Preview on a new Mac mini (M1, 2020, 16GB) and began the tutorial.

Actual behavior

Successfully built and ran the tutorial web server, but encountered and error building the app.

Information

  • macOS Version: 11.1

Diagnostic logs

docker build -t getting-started .
[+] Building 10.9s (8/8) FINISHED                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                             0.3s
 => => transferring dockerfile: 142B                                                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                0.5s
 => => transferring context: 2B                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:12-alpine                                                                                1.0s
 => [1/4] FROM docker.io/library/node:12-alpine@sha256:c55997a1fa957458167ba4449de55f4bbc107b2fce78b85efdcf40e1981f16cb                          0.0s
 => [internal] load build context                                                                                                                0.3s
 => => transferring context: 4.63MB                                                                                                              0.1s
 => CACHED [2/4] WORKDIR /app                                                                                                                    0.0s
 => [3/4] COPY . .                                                                                                                               0.5s
 => ERROR [4/4] RUN yarn install --production                                                                                                    8.3s
------                                                                                                                                                
 > [4/4] RUN yarn install --production:                                                                                                               
#8 0.956 yarn install v1.22.5                                                                                                                         
#8 0.988 [1/4] Resolving packages...                                                                                                                  
#8 1.091 [2/4] Fetching packages...                                                                                                                   
#8 5.488 info fsevents@1.2.9: The platform "linux" is incompatible with this module.                                                                  
#8 5.488 info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
#8 5.491 [3/4] Linking dependencies...
#8 5.778 [4/4] Building fresh packages...
#8 7.529 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#8 7.529 error /app/node_modules/sqlite3: Command failed.
#8 7.529 Exit code: 1
#8 7.529 Command: node-pre-gyp install --fallback-to-build
#8 7.529 Arguments: 
#8 7.529 Directory: /app/node_modules/sqlite3
#8 7.529 Output:
#8 7.529 node-pre-gyp info it worked if it ends with ok
#8 7.529 node-pre-gyp info using node-pre-gyp@0.11.0
#8 7.529 node-pre-gyp info using node@12.20.0 | linux | arm64
#8 7.529 node-pre-gyp WARN Using request for node-pre-gyp https download 
#8 7.529 node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node" (not found)
#8 7.529 node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v72-linux-arm64.tar.gz
#8 7.529 node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v72-linux-arm64.tar.gz
#8 7.529 node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v72-linux-arm64.tar.gz 
#8 7.529 node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.1.0 and node@12.20.0 (node-v72 ABI, musl) (falling back to source compile with node-gyp) 
#8 7.529 node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v72-linux-arm64.tar.gz 
#8 7.529 gyp info it worked if it ends with ok
#8 7.529 gyp info using node-gyp@5.1.0
#8 7.529 gyp info using node@12.20.0 | linux | arm64
#8 7.529 gyp info ok 
#8 7.529 gyp info it worked if it ends with ok
#8 7.529 gyp info using node-gyp@5.1.0
#8 7.529 gyp info using node@12.20.0 | linux | arm64
#8 7.529 gyp ERR! find Python 
#8 7.529 gyp ERR! find Python Python is not set from command line or npm configuration
#8 7.529 gyp ERR! find Python Python is not set from environment variable PYTHON
#8 7.529 gyp ERR! find Python checking if "python" can be used
#8 7.529 gyp ERR! find Python - "python" is not in PATH or produced an error
#8 7.529 gyp ERR! find Python checking if "python2" can be used
#8 7.529 gyp ERR! find Python - "python2" is not in PATH or produced an error
#8 7.529 gyp ERR! find Python checking if "python3" can be used
#8 7.529 gyp ERR! find Python - "python3" is not in PATH or produced an error
#8 7.529 gyp ERR! find Python 
#8 7.529 gyp ERR! find Python **********************************************************
#8 7.529 gyp ERR! find Python You need to install the latest version of Python.
#8 7.529 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#8 7.529 gyp ERR! find Python you can try one of the following options:
#8 7.529 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#8 7.529 gyp ERR! find Python   (accepted by both node-gyp and npm)
#8 7.529 gyp ERR! find Python - Set the environment variable PYTHON
#8 7.529 gyp ERR! find Python - Set the npm configuration variable python:
#8 7.529 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#8 7.529 gyp ERR! find Python For more information consult the documentation at:
#8 7.529 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#8 7.529 gyp ERR! find Python **********************************************************
#8 7.529 gyp ERR! find Python 
#8 7.529 gyp ERR! configure error 
#8 7.529 gyp ERR! stack Error: Could not find any Python installation to use
#8 7.529 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
#8 7.529 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
#8 7.529 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
#8 7.529 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
#8 7.529 gyp ERR! stack     at exithandler (child_process.js:315:5)
#8 7.529 gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
#8 7.529 gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
#8 7.529 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
#8 7.529 gyp ERR! stack     at onErrorNT (internal/child_process.js:470:16)
#8 7.529 gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
#8 7.529 gyp ERR! System Linux 4.19.104-linuxkit
#8 7.529 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
#8 7.529 gyp ERR! cwd /app/node_modules/sqlite3
#8 7.529 gyp ERR! node -v v12.20.0
#8 7.529 gyp ERR! node-gyp -v v5.1.0
#8 7.529 gyp ERR! not ok 
#8 7.529 node-pre-gyp ERR! build error 
#8 7.529 node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
#8 7.529 node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
#8 7.529 node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
#8 7.529 node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1022:16)
#8 7.529 node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
#8 7.529 node-pre-gyp ERR! System Linux 4.19.104-linuxkit
#8 7.529 node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#8 7.529 node-pre-gyp ERR! cwd /app/node_modules/sqlite3
#8 7.529 node-pre-gyp ERR! node -v v12.20.0
#8 7.529 node-pre-gyp ERR! node-pre-gyp -v v0.11.0
#8 7.529 node-pre-gyp ERR! not ok 
#8 7.529 Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
------
executor failed running [/bin/sh -c yarn install --production]: exit code: 1

Docker for Mac: version 0.0.0 (1) Preview

Steps to reproduce the behavior

  1. Install Docker
  2. Begin the tutorial, completing through http://localhost/tutorial/our-application/, Building the App's Container Image step 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions