microsoft / Oryx

Build your repo automatically.
Other
750 stars 172 forks source link

[buildpacks] cannot build `node` on macOS-arm64 #2525

Open weikanglim opened 6 days ago

weikanglim commented 6 days ago

On a macOS ARM64 machine, in any node project with package.json, run pack build myapp --builder mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1 --path .

The following error is observed:

[builder] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[builder]    at CallSite.Target(Closure, CallSite, Object)
[builder] /cnb/buildpacks/oryx_node-build/0.0.1/bin/build: line 47:    73 Aborted                 oryx build ${PWD} --platform "${NODE_ORYX_BUILD_NAME}" --platform-version "${BP_PLATFORM_VERSION}" --output ./oryx-output

Full output below:

pack build myapp --builder mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1 --path .   
debian-bullseye-20240424.1: Pulling from oryx/builder
Digest: sha256:b4960e88f70c9e39a0e51df060a1b51b4f7405323ab24c83e428dc80a43b130a
Status: Image is up to date for mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1
stack-run-debian-bullseye-20230926.1: Pulling from oryx/builder
Digest: sha256:b4e65a33543997bab33856cb8cad948aa5b12dd152c34b1f1d6db9ec190e73dc
Status: Image is up to date for mcr.microsoft.com/oryx/builder:stack-run-debian-bullseye-20230926.1
0.17.0: Pulling from buildpacksio/lifecycle
Digest: sha256:bc0d791f89bda0e8fbf9bf3e47c2faf1ac4eca4b16f0b01c6cb606883759766a
Status: Image is up to date for buildpacksio/lifecycle:0.17.0
===> ANALYZING
[analyzer] Timer: Analyzer started at 2024-09-18T15:10:19Z
[analyzer] Image with name "myapp" not found
[analyzer] Timer: Analyzer ran for 1.234709ms and ended at 2024-09-18T15:10:19Z
===> DETECTING
[detector] Warning: Platform requested experimental feature 'Dockerfiles'
[detector] Timer: Detector started at 2024-09-18T15:10:43Z
[detector] oryx/node-runtime 0.0.1
[detector] oryx/node-install 0.0.1
[detector] fagiani/apt       0.2.5
[detector] oryx/node-build   0.0.1
[detector] Timer: Detector ran for 3.590343794s and ended at 2024-09-18T15:10:47Z
[detector] Timer: Generator started at 2024-09-18T15:10:47Z
[detector] Loading environment variables from existing 'oryx.env' file.
[detector] Warning: new runtime base image 'mcr.microsoft.com/oryx/node:18.19.1-debian-bullseye' not found in run metadata
[detector] Timer: Generator ran for 83.31075ms and ended at 2024-09-18T15:10:47Z
18.19.1-debian-bullseye: Pulling from oryx/node
Digest: sha256:406c9a8e30e96d0027d84191ad4af6b1047c37210ec85d7d620dc178e44968b2
Status: Image is up to date for mcr.microsoft.com/oryx/node:18.19.1-debian-bullseye
===> RESTORING
[restorer] Timer: Restorer started at 2024-09-18T15:10:48Z
[restorer] Timer: Restorer ran for 1.2775ms and ended at 2024-09-18T15:10:48Z
===> BUILDING
[builder] Timer: Builder started at 2024-09-18T15:10:49Z
[builder] Loading environment variables from existing 'oryx.env' file.
[builder] Preparing environment for nodejs=18
[builder] Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
[builder] You can report issues at https://github.com/Microsoft/Oryx/issues
[builder] 
[builder] Oryx Version: 0.2.0.0, Commit: 367e0ec93195de6a8503ff5fe7a1fe41fc772c35, ReleaseTagName: 
[builder] 
[builder] Skipping platform detection since '--skip-detection' switch was used...
[builder] Version '18.20.4' of platform 'nodejs' is not installed. Generating script to install it...
[builder] 
[builder] Setting up environment...
[builder] 
[builder] 
[builder] Downloading and extracting 'nodejs' version '18.20.4' to '/layers/opt/nodejs/18.20.4'...
[builder] Detected image debian flavor: bullseye.
[builder] Downloaded in 1 sec(s).
[builder] Verifying checksum...
[builder] Extracting contents...
[builder] performing sha512 checksum for: nodejs...
[builder] Done in 3 sec(s).
[builder] 
[builder] 
[builder] Done setting up environment.
[builder] 
[builder] Loading environment variables from existing 'oryx.env' file.
[builder] Building application with platform nodejs=18
[builder] Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
[builder] You can report issues at https://github.com/Microsoft/Oryx/issues
[builder] 
[builder] Oryx Version: 0.2.0.0, Commit: 367e0ec93195de6a8503ff5fe7a1fe41fc772c35, ReleaseTagName: 
[builder] 
[builder] Build Operation ID: 89ed1a791ed8f4ab
[builder] OS Type           : bullseye
[builder] Image Type        : cli
[builder] 
[builder] Detecting platforms...
[builder] Detected following platforms:
[builder]   nodejs: 18.20.4
[builder]   python: 3.8.19
[builder]   php: 8.0.30
[builder] Version '3.8.19' of platform 'python' is not installed. Generating script to install it...
[builder] Version '8.0.30' of platform 'php' is not installed. Generating script to install it...
[builder] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[builder]    at CallSite.Target(Closure, CallSite, Object)
[builder] /cnb/buildpacks/oryx_node-build/0.0.1/bin/build: line 47:    73 Aborted                 oryx build ${PWD} --platform "${NODE_ORYX_BUILD_NAME}" --platform-version "${BP_PLATFORM_VERSION}" --output ./oryx-output
[builder] Timer: Builder ran for 12.642915131s and ended at 2024-09-18T15:11:01Z
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
viennguyendeveloper commented 16 hours ago

did you resolve this issue ?