Skip to content

Commit 1877ce8

Browse files
fix: Update npm install command to use --os flag for sharp >0.32.6
1 parent 23ed1df commit 1877ce8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/open-next/src/build/createImageOptimizationBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export async function createImageOptimizationBundle(
110110
// Target should be same as used by Lambda, see https://github.com/sst/sst/blob/ca6f763fdfddd099ce2260202d0ce48c72e211ea/packages/sst/src/constructs/NextjsSite.ts#L114
111111
// For SHARP_IGNORE_GLOBAL_LIBVIPS see: https://github.com/lovell/sharp/blob/main/docs/install.md#aws-lambda
112112

113-
const sharpVersion = process.env.SHARP_VERSION ?? "0.32.6";
113+
const sharpVersion = process.env.SHARP_VERSION ?? "0.34.4";
114114

115115
installDependencies(
116116
outputPath,

packages/open-next/src/build/installDeps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function installDependencies(
3636
: "";
3737

3838
const additionalArgs = installOptions.additionalArgs ?? "";
39-
const installCommand = `npm install --platform=linux ${archOption} ${targetOption} ${libcOption} ${additionalArgs} ${installOptions.packages.join(" ")}`;
39+
const installCommand = `npm install --os=linux ${archOption} ${targetOption} ${libcOption} ${additionalArgs} ${installOptions.packages.join(" ")}`;
4040
execSync(installCommand, {
4141
stdio: "pipe",
4242
cwd: tempInstallDir,

packages/open-next/src/types/open-next.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export interface InstallOptions {
279279
* @example
280280
* ```ts
281281
* install: {
282-
* packages: ["sharp@0.32"]
282+
* packages: ["sharp@0.34"]
283283
* }
284284
* ```
285285
*/

0 commit comments

Comments
 (0)