Closed danielg-cf closed 2 years ago
Had the same problem using NPM 7 – worked around this by adding --npm-options="--production"
to my claudia update
script:
"update": "claudia update --profile xxxxxx --no-optional-dependencies --handler built/index.handler --config claudia.staging.json --quiet --npm-options=\"--production\""
Hopefully this gets merged soon
To get rid of optional aws-sdk I also added --no-optional
flag. Because only --production
didn't help me.
--npm-options=\"--production --no-optional\"
thanks, this is now published as v 5.14.0
I still have problems with npm 6.14.15 (and a yarn.lock) – optional dependencies make it into the package. anyone else?
Unless these flags are set, dedupe re-installs optional dependencies. This issue was confirmed on Node 12, 14, 16 with NPM versions 6.14.12 and 7.14.0.