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

Dedupe with "--production" and "--no-optional" flags #225

Merged
merged 1 commit into from
Oct 18, 2021
Merged

Dedupe with "--production" and "--no-optional" flags #225

merged 1 commit into from
Oct 18, 2021

Conversation

danielg-cf
Copy link
Contributor

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.

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.
@pkyeck
Copy link

pkyeck commented May 27, 2021

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

@Biktop
Copy link

Biktop commented Jul 31, 2021

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\"

@gojko gojko merged commit d56f89d into claudiajs:master Oct 18, 2021
@gojko
Copy link
Member

gojko commented Oct 18, 2021

thanks, this is now published as v 5.14.0

@pkyeck
Copy link

pkyeck commented Feb 8, 2022

I still have problems with npm 6.14.15 (and a yarn.lock) – optional dependencies make it into the package. anyone else?

@mau11
Copy link

mau11 commented Jan 15, 2025

I am also having this issue where the no optional dependencies flag is ignored. This is causing deployment to fail due to the file size.

npm 10.2.4
node v20.11.1

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.

6 participants