question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion - suggest npm ci instead of npm install

See original GitHub issue

For teams using package.lock.json advising the user to use npm install is not good advice. WOuld it be possible to add configuration to allow it do advise running npm ci instead?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mgolcommented, Sep 11, 2019

@jackgeek There’s already the packageManager option that controls which package manager to use. This is needed because some of them use a different folder for their dependencies (e.g. Bower uses bower_components).

BTW, currently only npm & bower are officially supported (see the README). I think adding support for more should be doable, in many places there’s logic that checks whether packageManager === 'npm' and if not, assumes it’s Bower. If that logic was reversed, more package managers could be supported as most behave like npm. PRs for that are also welcome if you’re interested (please remember about tests!).

0reactions
mgolcommented, Sep 30, 2019

@jackgeek I went ahead & updated eslint-config-mgol & introduced Prettier to check-dependencies. Hopefully the setup is now more to your liking. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

installDeps.sh: use "npm ci" instead of "npm install"? #3778
In #3750 a user implicitly suggested we could use npm ci to install dependencies. At the moment, bin/installDeps.sh uses npm install :.
Read more >
Use `npm ci` instead of `npm install` with CI - Support
Did you try to use npm ci instead of npm install in .travis.yml? ... and inside it the author suggested to use npm...
Read more >
npm ci vs. npm install — Which Should You Use in Your Node ...
I'd recommend using npm ci if possible, as it does its job reliably, and use npm install for installing new dependencies or updating...
Read more >
Why you should never use 'npm install' in your CI/CD pipelines
Use npm install when you are working on your local machine and want to install/add/modify dependencies. · Use npm ci when you are...
Read more >
npm-ci
NOTE: If you create your package-lock.json file by running npm install with flags that can affect the shape of your dependency tree, such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found