Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 0dc04e6

Browse files
committed
fix: pack base-layer with --legacy-peer-deps
See aws/aws-sdk-js-v3#2051
1 parent d0138f9 commit 0dc04e6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cdk/helper/lambdas/makeLayerFromPackageJSON.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ export const makeLayerFromPackageJSON__Unsafe = async ({
5656

5757
reporter.progress('base-layer')('Installing dependencies ...')
5858
await new Promise<void>((resolve, reject) => {
59-
const p = spawn('npm', ['i', '--ignore-scripts', '--only=prod'], {
60-
cwd: dir,
61-
})
59+
const p = spawn(
60+
'npm',
61+
['i', '--ignore-scripts', '--only=prod', '--legacy-peer-deps'],
62+
{
63+
cwd: dir,
64+
},
65+
)
6266
p.on('close', (code) => {
6367
if (code !== 0) {
6468
const msg = `[CloudFormation Layer] npm i in ${dir} exited with code ${code}.`

0 commit comments

Comments
 (0)