File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff 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 "
You can’t perform that action at this time.
0 commit comments