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

[frontend] update sharp to latest to avoid docker build issue on M1 #5

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

basti1302
Copy link
Member

Building the frontend container image on an Apple M1 would result in the following error during docker build:

15.56 > Build error occurred
15.56 [Error: ENOENT: no such file or directory, copyfile '/app/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node' -> '/app/.next/standalone/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node'] {
15.56   errno: -2,
15.56   code: 'ENOENT',
15.56   syscall: 'copyfile',
15.56   path: '/app/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node',
15.56   dest: '/app/.next/standalone/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node'
15.56 }

Updating sharp to v0.33.x avoids this problem, as that version includes pre-build sharp binaries for various platforms, see https://sharp.pixelplumbing.com/changelog#v0330---29th-november-2023

Copy link

socket-security bot commented Feb 1, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] environment Transitive: eval, filesystem, shell +26 180 MB lovell

🚮 Removed packages: npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Feb 1, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@basti1302 basti1302 enabled auto-merge (rebase) February 1, 2024 09:47
@basti1302
Copy link
Member Author

@SocketSecurity ignore npm/[email protected]

Building the frontend container image on an Apple M1 would result in
the following error during docker build:

    15.56 > Build error occurred
    15.56 [Error: ENOENT: no such file or directory, copyfile '/app/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node' -> '/app/.next/standalone/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node'] {
    15.56   errno: -2,
    15.56   code: 'ENOENT',
    15.56   syscall: 'copyfile',
    15.56   path: '/app/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node',
    15.56   dest: '/app/.next/standalone/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node'
    15.56 }

Updating sharp to v0.33.x avoids this problem, as that version includes
pre-built sharp binaries for various platforms, see
https://sharp.pixelplumbing.com/changelog#v0330---29th-november-2023
@basti1302 basti1302 merged commit ab4c4aa into main Feb 1, 2024
47 checks passed
@basti1302 basti1302 deleted the update-sharp branch February 1, 2024 11:10
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

Successfully merging this pull request may close these issues.

1 participant