Skip to content

Commit 4e84120

Browse files
committed
updates to the readme, inclusion of both x64 and arm64 - debug
1 parent a4a7010 commit 4e84120

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,20 @@ RUN TARGET_ARCH=${TARGET_ARCH} node ./node_modules/webpack/bin/webpack.js
2828
RUN echo ">>> Running smoke test on packaged layer..." && \
2929
node -e " \
3030
try { \
31-
const sharp = require('/build/dist/${layerBasePath}'); \
31+
/* --- HARDCODE Correct path relative to /build/dist --- */ \
32+
const sharp = require('/build/dist/nodejs/node_modules/sharp'); \
3233
console.log('>>> SUCCESS: require(\'sharp\') loaded.'); \
33-
console.log('Sharp versions:', sharp.versions); \
34+
/* Check for versions property existence before accessing */ \
35+
if (sharp && sharp.versions) { \
36+
console.log('Sharp versions:', sharp.versions); \
37+
} else { \
38+
console.log('Sharp loaded, but versions property not found.'); \
39+
} \
3440
} catch (err) { \
3541
console.error('>>> FAILURE: require(\'sharp\') failed:', err); \
42+
/* Add more debug info on failure */ \
43+
console.error('Listing /build/dist/nodejs/node_modules/sharp contents on failure:'); \
44+
ls -lR /build/dist/nodejs/node_modules/sharp || echo 'Failed to list contents.'; \
3645
exit 1; \
3746
} \
3847
"

0 commit comments

Comments
 (0)