-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm ci
ignores --production
flag and always installs devDependencies
.
#2017
Comments
Also ignores |
Fixes: #2017 Credit: @darcyclarke Close: #2159 Reviewed-by: @ruyadorno
It happens again in 7.20.3. Does anyone have the same problems? |
I'm running into this issue with 7.24.0 as I've explained here.
Using either |
@cheslijones works for me here:
Is it possible that you have something with a production dependency on one of your devDependencies? Can you inspect your package-lock.json file and see if those dev deps have |
Sorry, disregard. I didn't realize that by |
@cheslijones happy to help :) |
There are no flag --production in npm ci docs https://docs.npmjs.com/cli/v8/commands/npm-ci And if you think how it works you'll understand why. |
@Piliponful Because after
Log also with some missing packages errors that are clearly not in package-lock.json. |
Current Behavior:
npm ci --production
installs dependencies marked asdev
inpackage-lock.json
.Expected Behavior:
I expect
npm ci
to not install any packages marked asdev
in lockfile.npm 6 behaves as expected and installs only production dependencies with
--production
flag.In example below, I expect
@types/yargs
to not be installed for production.Steps To Reproduce:
Expected output (npm 6.14.8)
Actual output (npm 7.0.3)
Environment:
NODE_ENV
is emptyThe text was updated successfully, but these errors were encountered: