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.

installing extraneous dependencies

See original GitHub issue

i noticed some peer dependency warnings about semantic-release and got curious why my non-package project had semantic-release installed at all. it looks like your dev dependencies are getting installed for some reason.

Expected Behavior

installing is-website-vulnerable should only install it and its production dependencies

Current Behavior

even though semantic-release and its plugins are only listed as dev-dependencies, at least some of the dependencies are getting installed in my project:

$ npm ls @semantic-release/github
matt.travi.org@ /path/to/my/project/matt.travi.org
└─┬ is-website-vulnerable@1.9.3
  └── @semantic-release/github@5.5.5  extraneous

Possible Solution

i havent used shrinkwrap much, but that is my best guess as to why this is happening. is it possible to only shrinkwrap prod dependencies?

Steps to Reproduce (for bugs)

  1. npm install is-website-vulnerable --save-dev
  2. npm ls @semantic-release/github (or another dev-dependency)

Context

i’m seeing peer-dependency warnings for dev-dependencies of this project that shouldnt have an impact on my project. i normally also enforce that npm ls exits with zero, which this would make fail. this particular does not fully enforce that yet, so this issue slipped through unnoticed originally

Your Environment

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
travicommented, Apr 26, 2020

Great work! Looks like that did it. Thanks a lot!

1reaction
travicommented, Dec 16, 2019

now that i could install the new version, i was able to confirm that the peer-dependency issues look good, but npm ls does still complain about the extraneous dev-dependencies, and therefore exits with 1 instead of 0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why (and How Can I FIx) ESLint import/no-extraneous ...
Run 'npm i -S lodash' to add it import/no-extraneous-dependencies. However, I have both of those module installed and in my package.json :
Read more >
eslint-plugin-import/no-extraneous-dependencies.md at main
ESLint plugin with rules that help validate proper imports. - eslint-plugin-import/no-extraneous-dependencies.md at main · import-js/eslint-plugin-import.
Read more >
A Guide to ESLint | Laurie on Tech
While this is helpful, some rules need to get more specific. For example, ESLint has a rule called import/no-extraneous-dependencies . The goal ...
Read more >
node_modules/eslint-plugin-import/docs/rules/no-extraneous ...
Modules have to be installed for this rule to work. Options. This rule supports the following options: devDependencies : If set to false...
Read more >
eslint-plugin-import - npm
... Forbid the use of extraneous packages ( no-extraneous-dependencies ); Forbid the use of mutable ... npm install eslint-plugin-import -g.
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