问题
How I can skip installing optional dependencies from package-lock.json
by npm ci
?
回答1:
You can use npm ci --no-optional . If npm still installs the optional package. Then try after removing package.lock.json and run the command again.
回答2:
A bit late, but you can use npm ci --no-optional
. I tested it. Make shure your npm version is a least 6.13.4 (maybe earlier version will work but I can't confirm).
来源:https://stackoverflow.com/questions/53969343/how-i-can-skip-installing-optional-dependencies-by-npm-ci