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

Commit

Permalink
fix: pack base-layer with --legacy-peer-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Mar 5, 2021
1 parent 8ebc5d3 commit dd6e0ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cdk/helper/lambdas/makeLayerFromPackageJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ export const makeLayerFromPackageJSON__Unsafe = async ({

reporter.progress('base-layer')('Installing dependencies ...')
await new Promise<void>((resolve, reject) => {
const p = spawn('npm', ['i', '--ignore-scripts', '--only=prod'], {
cwd: dir,
})
const p = spawn(
'npm',
['i', '--ignore-scripts', '--only=prod', '--legacy-peer-deps'],
{
cwd: dir,
},
)
p.on('close', (code) => {
if (code !== 0) {
const msg = `[CloudFormation Layer] npm i in ${dir} exited with code ${code}.`
Expand Down

0 comments on commit dd6e0ab

Please sign in to comment.