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.

False positives reported when using yarn instead of npm to install modules

See original GitHub issue

From @tyrsius on March 1, 2017 23:19

  • VSCode Version: Version 1.10.0 (1.10.0)
  • OS Version: macOS Sierre 10.12 (16A323)

Steps to Reproduce:

  1. Create an empty project with the following package.json file
{
  "name": "vscode-bug",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "engine-handlebars": "^0.8.0",
    "express": "^4.14.0",
    "newrelic": "^1.36.2",
    "node-uuid": "^1.4.7"
  },
  "devDependencies": {
    "autoprefixer-stylus": "^0.11.0",
    "babel-core": "^6.3.21",
    "babel-eslint": "^7.0.0",
    "babel-loader": "^6.2.0",
    "babel-plugin-transform-runtime": "^6.15.0",
    "babel-plugin-webpack-alias": "^2.1.1",
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-react": "^6.3.13",
    "babel-preset-stage-0": "^6.3.13",
    "babel-tape-runner": "^2.0.1",
    "blue-tape": "^1.0.0",
    "chokidar-cli": "^1.2.0",
    "deep-extend": "^0.4.1",
    "immutable": "^3.8.1",
    "json-loader": "^0.5.4",
    "localforage": "^1.4.3",
    "npm-run-all": "^4.0.1",
    "qs": "^6.3.0",
    "raw-loader": "^0.5.1",
    "react": "^15.3.2",
    "react-addons-test-utils": "^15.3.2",
    "react-document-title": "^2.0.2",
    "react-dom": "^15.3.2",
    "react-hot-loader": "^3.0.0-beta.6",
    "react-markdown": "^2.4.2",
    "react-redux": "^4.4.5",
    "react-router": "^2.8.1",
    "react-router-redux": "^4.0.6",
    "redbox-react": "^1.3.2",
    "redux": "^3.6.0",
    "redux-thunk": "^2.1.0",
    "skin-deep": "^0.16.0",
    "snazzy": "^5.0.0",
    "source-map-loader": "^0.1.5",
    "standard": "^8.4.0",
    "stylus": "^0.54.5",
    "tap-spec": "^4.1.1",
    "url-join": "^1.1.0",
    "webpack": "^1.11.0",
    "webpack-dev-server": "^1.10.1"
  },
  "author": "",
  "license": "ISC"
}
  1. run npm install
  2. You will see the following problems listed for dependencies

[npm] Module ‘https-proxy-agent’ is extraneous [npm] Module ‘node-pre-gyp’ is extraneous [npm] Module ‘readable-stream’ is extraneous

These packages are not dependencies of the package, and this error should not show.

Copied from original issue: Microsoft/vscode#21666

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:26 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
egammacommented, Apr 3, 2017

@banyudu

cnpm has this issue, too. But it doesn’t have a file like yarn.lock.

Thinking about this some more this extension should support that the user can configure which node package manager they want to use.

1reaction
egammacommented, Mar 29, 2017

From @banyudu on March 29, 2017 1:44

@egamma Yes, it works with npm. But if someone use yarn or cnpm instead of npm, things are different.

npm install --save-dev eslint should create only one directory named ‘eslint’ under node_modules, while yarn add eslint and cnpm install --save-dev eslint will create lots of directories(or symbolic links) under node_modules.

These directories(or symbolic links) will trigger the extraneous warn.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Force yarn install instead of npm install for Node module?
For a portable solution that won't have false-positives if another npm process happens to be running, using node -e 'JS_CODE' is probably ...
Read more >
Yarn and the dark future of third party NPM clients
False Positives On Install. Firstly, sometimes Yarn appears to hang mid way through an install. And sometimes it is (actually) hanging.
Read more >
How to fix security vulnerabilities in Yarn - Debricked
In the post below we will focus on tools for evaluating the security of yarn packages. Why use Yarn instead of npm? Yarn...
Read more >
Migrating from npm - Yarn
Migrating from npm should be a fairly easy process for most users. Yarn can consume the same package.json format as npm, and can...
Read more >
Yarn and the dark future of third party ... - Open Up The Cloud
Yarn doesn't handle the underlying NPM infrastructure with elegance — and it ... False Positives On Install ... [1/4] Resolving packages.
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