Skip to content
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

Some dependency seems to get skipped and unable to find (chokidar) #629

Closed
sairion opened this issue Oct 11, 2016 · 40 comments
Closed

Some dependency seems to get skipped and unable to find (chokidar) #629

sairion opened this issue Oct 11, 2016 · 40 comments
Labels

Comments

@sairion
Copy link

sairion commented Oct 11, 2016

Do you want to request a feature or report a bug?
bug
What is the current behavior?
after install, I am seeing errors 'chokidar' is not installed. It seems to be included in babel-cli, watchpack, etc modules but it is not in node_modules. However, I can chokidar in yarn.lock. This makes me enable to do webpack --watch
If the current behavior is a bug, please provide the steps to reproduce.

{
  "name": "yarnjs-bug-missing-deps",
  "description": "",
  "version": "1.0.0",
  "author": "Jaeho Lee <[email protected]>",
  "licenses": "proprietary",
  "scripts": {
    "postinstall": ""
  },
  "devDependencies": {
    "babel-cli": "^6.16.0",
    "babel-core": "^6.4.5",
    "webpack": "^1.12.12"
  }
}

Use this package.json to yarn and see chokidar is missing in node_modules

What is the expected behavior?
chokidar shouldn't be missing; There could be another dependencies gone missing but currently chokidar is only thing I can find so far.
Please mention your node.js, yarn and operating system version.
Node v6.3.0, OSX 10.10.5

@sebmck
Copy link
Contributor

sebmck commented Oct 11, 2016

Thanks for the report! Can you please post the output of yarn ls? I'm wondering if we're just putting it in the wrong location or are omitting it entirely.

@sairion
Copy link
Author

sairion commented Oct 11, 2016

@kittens Actually, I think I found a clue. When I install webpack solely, chokidar is in correct place. But when I include babel-cli as a dependency, it goes away. babel-cli declared chokidar as optionalDependencies and I think #628 could be a related issue.

Below is output of yarn ls when babel-cli is only dependency in package.json.

yarn ls v0.15.0
warning [email protected]: No license field
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ arrify@^1.0.0
│  └─ micromatch@^2.1.5
├─ [email protected]
├─ [email protected]
│  ├─ delegates@^1.0.0
│  └─ readable-stream@^2.0.0 || ^1.1.13
├─ [email protected]
│  └─ arr-flatten@^1.0.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ babel-core@^6.16.0
│  ├─ babel-polyfill@^6.16.0
│  ├─ babel-register@^6.16.0
│  ├─ babel-runtime@^6.9.0
│  ├─ bin-version-check@^2.1.0
│  ├─ [email protected]
│  ├─ chokidar@^1.0.0
│  ├─ commander@^2.8.1
│  ├─ convert-source-map@^1.1.0
│  ├─ fs-readdir-recursive@^0.1.0
│  ├─ glob@^5.0.5
│  ├─ lodash@^4.2.0
│  ├─ log-symbols@^1.0.2
│  ├─ output-file-sync@^1.1.0
│  ├─ path-exists@^1.0.0
│  ├─ path-is-absolute@^1.0.0
│  ├─ request@^2.65.0
│  ├─ slash@^1.0.0
│  ├─ source-map@^0.5.0
│  └─ v8flags@^2.0.10
├─ [email protected]
│  ├─ chalk@^1.1.0
│  ├─ [email protected]
│  │  ├─ ansi-styles@^2.2.1
│  │  ├─ escape-string-regexp@^1.0.2
│  │  ├─ has-ansi@^2.0.0
│  │  ├─ strip-ansi@^3.0.0
│  │  └─ supports-color@^2.0.0
│  ├─ esutils@^2.0.2
│  └─ js-tokens@^2.0.0
├─ [email protected]
│  ├─ babel-code-frame@^6.16.0
│  ├─ babel-generator@^6.17.0
│  ├─ babel-helpers@^6.16.0
│  ├─ babel-messages@^6.8.0
│  ├─ babel-register@^6.16.0
│  ├─ babel-runtime@^6.9.1
│  ├─ babel-template@^6.16.0
│  ├─ babel-traverse@^6.16.0
│  ├─ babel-types@^6.16.0
│  ├─ babylon@^6.11.0
│  ├─ convert-source-map@^1.1.0
│  ├─ debug@^2.1.1
│  ├─ json5@^0.4.0
│  ├─ lodash@^4.2.0
│  ├─ minimatch@^3.0.2
│  ├─ path-exists@^1.0.0
│  ├─ path-is-absolute@^1.0.0
│  ├─ private@^0.1.6
│  ├─ shebang-regex@^1.0.0
│  ├─ slash@^1.0.0
│  └─ source-map@^0.5.0
├─ [email protected]
│  ├─ babel-messages@^6.8.0
│  ├─ babel-runtime@^6.9.0
│  ├─ babel-types@^6.16.0
│  ├─ detect-indent@^3.0.1
│  ├─ jsesc@^1.3.0
│  ├─ lodash@^4.2.0
│  └─ source-map@^0.5.0
├─ [email protected]
│  ├─ babel-runtime@^6.0.0
│  └─ babel-template@^6.16.0
├─ [email protected]
│  └─ babel-runtime@^6.0.0
├─ [email protected]
│  ├─ babel-runtime@^6.9.1
│  ├─ core-js@^2.4.0
│  └─ regenerator-runtime@^0.9.5
├─ [email protected]
│  ├─ babel-core@^6.16.0
│  ├─ babel-runtime@^6.11.6
│  ├─ core-js@^2.4.0
│  ├─ home-or-tmp@^1.0.0
│  ├─ lodash@^4.2.0
│  ├─ mkdirp@^0.5.1
│  ├─ path-exists@^1.0.0
│  └─ source-map-support@^0.4.2
├─ [email protected]
│  ├─ core-js@^2.4.0
│  └─ regenerator-runtime@^0.9.5
├─ [email protected]
│  ├─ babel-runtime@^6.9.0
│  ├─ babel-traverse@^6.16.0
│  ├─ babel-types@^6.16.0
│  ├─ babylon@^6.11.0
│  └─ lodash@^4.2.0
├─ [email protected]
│  ├─ babel-code-frame@^6.16.0
│  ├─ babel-messages@^6.8.0
│  ├─ babel-runtime@^6.9.0
│  ├─ babel-types@^6.16.0
│  ├─ babylon@^6.11.0
│  ├─ debug@^2.2.0
│  ├─ globals@^8.3.0
│  ├─ invariant@^2.2.0
│  └─ lodash@^4.2.0
├─ [email protected]
│  ├─ babel-runtime@^6.9.1
│  ├─ esutils@^2.0.2
│  ├─ lodash@^4.2.0
│  └─ to-fast-properties@^1.0.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ bin-version@^1.0.0
│  ├─ minimist@^1.1.0
│  ├─ semver-truncate@^1.0.0
│  └─ semver@^4.0.3
├─ [email protected]
│  └─ find-versions@^1.0.0
├─ [email protected]
├─ [email protected]
│  ├─ readable-stream@~2.0.5
│  └─ [email protected]
│  │  ├─ core-util-is@~1.0.0
│  │  ├─ inherits@~2.0.1
│  │  ├─ isarray@~1.0.0
│  │  ├─ process-nextick-args@~1.0.6
│  │  ├─ string_decoder@~0.10.x
│  │  └─ util-deprecate@~1.0.1
├─ [email protected]
│  └─ inherits@~2.0.0
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  ├─ balanced-match@^0.4.1
│  └─ [email protected]
├─ [email protected]
│  ├─ expand-range@^1.8.1
│  ├─ preserve@^0.2.0
│  └─ repeat-element@^1.1.2
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ camelcase@^2.0.0
│  └─ map-obj@^1.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ ansi-styles@^2.1.0
│  ├─ escape-string-regexp@^1.0.2
│  ├─ has-ansi@^2.0.0
│  ├─ strip-ansi@^3.0.0
│  └─ supports-color@^2.0.0
├─ [email protected]
│  └─ number-is-nan@^1.0.0
├─ [email protected]
│  └─ delayed-stream@~1.0.0
├─ [email protected]
│  └─ graceful-readlink@>= 1.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ array-find-index@^1.0.1
├─ [email protected]
│  ├─ assert-plus@^1.0.0
│  └─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ get-stdin@^4.0.1
│  ├─ minimist@^1.1.0
│  └─ repeating@^1.1.0
├─ [email protected]
│  └─ is-arrayish@^0.2.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ is-posix-bracket@^0.1.0
├─ [email protected]
│  └─ fill-range@^2.1.0
├─ [email protected]
├─ [email protected]
│  └─ is-extglob@^1.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ is-number@^2.1.0
│  ├─ isobject@^2.0.0
│  ├─ randomatic@^1.1.3
│  ├─ repeat-element@^1.1.2
│  └─ repeat-string@^1.5.2
├─ [email protected]
│  ├─ path-exists@^2.0.0
│  ├─ [email protected]
│  │  └─ pinkie-promise@^2.0.0
│  └─ pinkie-promise@^2.0.0
├─ [email protected]
│  ├─ array-uniq@^1.0.0
│  ├─ get-stdin@^4.0.1
│  ├─ meow@^3.5.0
│  └─ semver-regex@^1.0.0
├─ [email protected]
├─ [email protected]
│  └─ for-in@^0.1.5
├─ [email protected]
├─ [email protected]
│  ├─ asynckit@^0.4.0
│  ├─ combined-stream@^1.0.5
│  └─ mime-types@^2.1.11
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ fstream@^1.0.0
│  ├─ inherits@2
│  └─ minimatch@^3.0.0
├─ [email protected]
│  ├─ graceful-fs@^4.1.2
│  ├─ inherits@~2.0.0
│  ├─ mkdirp@>=0.5 0
│  └─ rimraf@2
├─ [email protected]
│  ├─ aproba@^1.0.3
│  ├─ console-control-strings@^1.0.0
│  ├─ has-color@^0.1.7
│  ├─ has-unicode@^2.0.0
│  ├─ object-assign@^4.1.0
│  ├─ signal-exit@^3.0.0
│  ├─ string-width@^1.0.1
│  ├─ strip-ansi@^3.0.1
│  └─ wide-align@^1.1.0
├─ [email protected]
├─ [email protected]
│  └─ is-property@^1.0.0
├─ [email protected]
├─ [email protected]
│  ├─ assert-plus@^1.0.0
│  └─ [email protected]
├─ [email protected]
│  ├─ glob-parent@^2.0.0
│  └─ is-glob@^2.0.0
├─ [email protected]
│  └─ is-glob@^2.0.0
├─ [email protected]
│  ├─ inflight@^1.0.4
│  ├─ inherits@2
│  ├─ minimatch@2 || 3
│  ├─ once@^1.3.0
│  └─ path-is-absolute@^1.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ chalk@^1.1.1
│  ├─ [email protected]
│  │  ├─ ansi-styles@^2.2.1
│  │  ├─ escape-string-regexp@^1.0.2
│  │  ├─ has-ansi@^2.0.0
│  │  ├─ strip-ansi@^3.0.0
│  │  └─ supports-color@^2.0.0
│  ├─ commander@^2.9.0
│  ├─ is-my-json-valid@^2.12.4
│  └─ pinkie-promise@^2.0.0
├─ [email protected]
│  └─ ansi-regex@^2.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ [email protected]
│  ├─ [email protected]
│  ├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ os-tmpdir@^1.0.1
│  └─ user-home@^1.1.1
├─ [email protected]
├─ [email protected]
│  ├─ assert-plus@^0.2.0
│  ├─ jsprim@^1.2.2
│  └─ sshpk@^1.7.0
├─ [email protected]
│  ├─ repeating@^2.0.0
│  └─ [email protected]
│  │  └─ is-finite@^1.0.0
├─ [email protected]
│  ├─ once@^1.3.0
│  └─ wrappy@1
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ loose-envify@^1.0.0
├─ [email protected]
├─ [email protected]
│  └─ binary-extensions@^1.0.0
├─ [email protected]
├─ [email protected]
│  └─ builtin-modules@^1.0.0
├─ [email protected]
├─ [email protected]
│  └─ is-primitive@^2.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ number-is-nan@^1.0.0
├─ [email protected]
│  └─ number-is-nan@^1.0.0
├─ [email protected]
│  └─ is-extglob@^1.0.0
├─ [email protected]
│  ├─ generate-function@^2.0.0
│  ├─ generate-object-property@^1.1.0
│  ├─ jsonpointer@^4.0.0
│  └─ xtend@^4.0.0
├─ [email protected]
│  └─ kind-of@^3.0.2
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ [email protected]
│  ├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ is-buffer@^1.0.2
├─ [email protected]
│  ├─ graceful-fs@^4.1.2
│  ├─ parse-json@^2.2.0
│  ├─ pify@^2.0.0
│  ├─ pinkie-promise@^2.0.0
│  └─ strip-bom@^2.0.0
├─ [email protected]
├─ [email protected]
│  ├─ chalk@^1.0.0
│  └─ [email protected]
│  │  ├─ ansi-styles@^2.2.1
│  │  ├─ escape-string-regexp@^1.0.2
│  │  ├─ has-ansi@^2.0.0
│  │  ├─ strip-ansi@^3.0.0
│  │  └─ supports-color@^2.0.0
├─ [email protected]
│  ├─ js-tokens@^1.0.1
│  └─ [email protected]
├─ [email protected]
│  ├─ currently-unhandled@^0.4.1
│  └─ signal-exit@^3.0.0
├─ [email protected]
├─ [email protected]
│  ├─ camelcase-keys@^2.0.0
│  ├─ decamelize@^1.1.2
│  ├─ loud-rejection@^1.0.0
│  ├─ map-obj@^1.0.1
│  ├─ minimist@^1.1.3
│  ├─ normalize-package-data@^2.3.4
│  ├─ object-assign@^4.0.1
│  ├─ read-pkg-up@^1.0.1
│  ├─ redent@^1.0.0
│  └─ trim-newlines@^1.0.0
├─ [email protected]
│  ├─ arr-diff@^2.0.0
│  ├─ array-unique@^0.2.1
│  ├─ braces@^1.8.2
│  ├─ expand-brackets@^0.1.4
│  ├─ extglob@^0.3.1
│  ├─ filename-regex@^2.0.0
│  ├─ is-extglob@^1.0.0
│  ├─ is-glob@^2.0.1
│  ├─ kind-of@^3.0.2
│  ├─ normalize-path@^2.0.1
│  ├─ object.omit@^2.0.0
│  ├─ parse-glob@^3.0.4
│  └─ regex-cache@^0.4.2
├─ [email protected]
├─ [email protected]
│  └─ mime-db@~1.24.0
├─ [email protected]
│  └─ brace-expansion@^1.0.0
├─ [email protected]
├─ [email protected]
│  ├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ mkdirp@~0.5.0
│  ├─ nopt@~3.0.1
│  ├─ [email protected]
│  ├─ rc@~1.1.0
│  ├─ [email protected]
│  ├─ rimraf@~2.5.0
│  ├─ semver@~5.3.0
│  ├─ [email protected]
│  ├─ tar-pack@~3.1.0
│  └─ tar@~2.2.0
├─ [email protected]
├─ [email protected]
│  └─ abbrev@1
├─ [email protected]
│  ├─ hosted-git-info@^2.1.4
│  ├─ is-builtin-module@^1.0.0
│  ├─ semver@2 || 3 || 4 || 5
│  ├─ [email protected]
│  └─ validate-npm-package-license@^3.0.1
├─ [email protected]
├─ [email protected]
│  ├─ are-we-there-yet@~1.1.2
│  ├─ console-control-strings@~1.1.0
│  ├─ gauge@~2.6.0
│  └─ set-blocking@~2.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ for-own@^0.1.3
│  └─ is-extendable@^0.1.1
├─ [email protected]
│  └─ wrappy@1
├─ [email protected]
├─ [email protected]
│  ├─ graceful-fs@^4.1.4
│  ├─ mkdirp@^0.5.1
│  └─ object-assign@^4.1.0
├─ [email protected]
│  ├─ glob-base@^0.3.0
│  ├─ is-dotfile@^1.0.0
│  ├─ is-extglob@^1.0.0
│  └─ is-glob@^2.0.0
├─ [email protected]
│  └─ error-ex@^1.2.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ graceful-fs@^4.1.2
│  ├─ pify@^2.0.0
│  └─ pinkie-promise@^2.0.0
├─ [email protected]
├─ [email protected]
│  └─ pinkie@^2.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ is-number@^2.0.2
│  └─ kind-of@^3.0.2
├─ [email protected]
│  ├─ deep-extend@~0.4.0
│  ├─ ini@~1.3.0
│  ├─ minimist@^1.2.0
│  └─ strip-json-comments@~1.0.4
├─ [email protected]
│  ├─ find-up@^1.0.0
│  └─ read-pkg@^1.0.0
├─ [email protected]
│  ├─ load-json-file@^1.0.0
│  ├─ normalize-package-data@^2.3.2
│  └─ path-type@^1.0.0
├─ [email protected]
│  ├─ buffer-shims@^1.0.0
│  ├─ core-util-is@~1.0.0
│  ├─ inherits@~2.0.1
│  ├─ isarray@~1.0.0
│  ├─ process-nextick-args@~1.0.6
│  ├─ string_decoder@~0.10.x
│  └─ util-deprecate@~1.0.1
├─ [email protected]
│  ├─ graceful-fs@^4.1.2
│  ├─ minimatch@^3.0.2
│  ├─ readable-stream@^2.0.2
│  └─ set-immediate-shim@^1.0.1
├─ [email protected]
│  ├─ indent-string@^2.1.0
│  └─ strip-indent@^1.0.1
├─ [email protected]
├─ [email protected]
│  ├─ is-equal-shallow@^0.1.3
│  └─ is-primitive@^2.0.0
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ is-finite@^1.0.0
├─ [email protected]
│  ├─ aws-sign2@~0.6.0
│  ├─ aws4@^1.2.1
│  ├─ bl@~1.1.2
│  ├─ caseless@~0.11.0
│  ├─ combined-stream@~1.0.5
│  ├─ extend@~3.0.0
│  ├─ forever-agent@~0.6.1
│  ├─ form-data@~2.0.0
│  ├─ har-validator@~2.0.6
│  ├─ hawk@~3.1.3
│  ├─ http-signature@~1.1.0
│  ├─ is-typedarray@~1.0.0
│  ├─ isstream@~0.1.2
│  ├─ json-stringify-safe@~5.0.1
│  ├─ mime-types@~2.1.7
│  ├─ node-uuid@~1.4.7
│  ├─ oauth-sign@~0.8.1
│  ├─ qs@~6.2.0
│  ├─ stringstream@~0.0.4
│  ├─ tough-cookie@~2.3.0
│  └─ tunnel-agent@~0.4.1
├─ [email protected]
│  ├─ glob@^7.0.5
│  └─ [email protected]
│  │  ├─ fs.realpath@^1.0.0
│  │  ├─ inflight@^1.0.4
│  │  ├─ inherits@2
│  │  ├─ minimatch@^3.0.2
│  │  ├─ once@^1.3.0
│  │  └─ path-is-absolute@^1.0.0
├─ [email protected]
├─ [email protected]
│  ├─ semver@^5.3.0
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ source-map@^0.5.3
├─ [email protected]
├─ [email protected]
│  └─ spdx-license-ids@^1.0.2
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ asn1@~0.2.3
│  ├─ assert-plus@^1.0.0
│  ├─ [email protected]
│  ├─ bcrypt-pbkdf@^1.0.0
│  ├─ dashdash@^1.12.0
│  ├─ ecc-jsbn@~0.1.1
│  ├─ getpass@^0.1.1
│  ├─ jodid25519@^1.0.0
│  ├─ jsbn@~0.1.0
│  └─ tweetnacl@~0.14.0
├─ [email protected]
├─ [email protected]
│  ├─ code-point-at@^1.0.0
│  ├─ is-fullwidth-code-point@^1.0.0
│  └─ strip-ansi@^3.0.0
├─ [email protected]
├─ [email protected]
│  └─ ansi-regex@^2.0.0
├─ [email protected]
│  └─ is-utf8@^0.2.0
├─ [email protected]
│  └─ get-stdin@^4.0.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  ├─ debug@~2.2.0
│  ├─ fstream-ignore@~1.0.5
│  ├─ fstream@~1.0.10
│  ├─ once@~1.3.3
│  ├─ [email protected]
│  │  └─ wrappy@1
│  ├─ readable-stream@~2.1.4
│  ├─ rimraf@~2.5.1
│  ├─ tar@~2.2.1
│  └─ uid-number@~0.0.6
├─ [email protected]
│  ├─ block-stream@*
│  ├─ fstream@^1.0.2
│  └─ inherits@2
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ user-home@^1.1.1
├─ [email protected]
│  ├─ spdx-correct@~1.0.0
│  └─ spdx-expression-parse@~1.0.0
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ string-width@^1.0.1
├─ [email protected]
└─ [email protected]

@sairion
Copy link
Author

sairion commented Oct 11, 2016

And this is output of npm ls which shows a few deps are not matching:

[email protected] /Users/user/yarnjs-bug-missing-deps
├── [email protected] extraneous
├── [email protected] extraneous
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │   └─┬ [email protected]
│ │ │ │     └── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └─┬ [email protected]
│ │ │     └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   ├─┬ [email protected]
│ │ │   │ ├─┬ [email protected]
│ │ │   │ │ └── [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ ├─┬ [email protected]
│ │ │   │ │ ├─┬ [email protected]
│ │ │   │ │ │ └── [email protected]
│ │ │   │ │ └── [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ ├─┬ [email protected]
│ │ │   │ │ ├── [email protected]
│ │ │   │ │ ├─┬ [email protected]
│ │ │   │ │ │ └── [email protected]
│ │ │   │ │ ├── [email protected]
│ │ │   │ │ └─┬ [email protected]
│ │ │   │ │   ├─┬ [email protected]
│ │ │   │ │   │ └── [email protected]
│ │ │   │ │   └── [email protected]
│ │ │   │ ├─┬ [email protected]
│ │ │   │ │ ├─┬ [email protected]
│ │ │   │ │ │ └── [email protected]
│ │ │   │ │ └─┬ [email protected]
│ │ │   │ │   ├─┬ [email protected]
│ │ │   │ │   │ ├─┬ [email protected]
│ │ │   │ │   │ │ └─┬ [email protected]
│ │ │   │ │   │ │   └── [email protected]
│ │ │   │ │   │ ├── [email protected]
│ │ │   │ │   │ └─┬ [email protected]
│ │ │   │ │   │   └── [email protected]
│ │ │   │ │   └── [email protected]
│ │ │   │ ├─┬ [email protected]
│ │ │   │ │ ├─┬ [email protected]
│ │ │   │ │ │ └── [email protected]
│ │ │   │ │ └── [email protected]
│ │ │   │ └── [email protected]
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── UNMET OPTIONAL DEPENDENCY chokidar@^1.0.0
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   ├── [email protected]
│ │ │   ├── [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   ├── [email protected]
│ │ │   ├── UNMET OPTIONAL DEPENDENCY bcrypt-pbkdf@^1.0.0
│ │ │   ├─┬ [email protected]
│ │ │   │ └── [email protected]
│ │ │   ├── UNMET OPTIONAL DEPENDENCY ecc-jsbn@~0.1.1
│ │ │   ├─┬ [email protected]
│ │ │   │ └── [email protected]
│ │ │   ├── UNMET OPTIONAL DEPENDENCY jodid25519@^1.0.0
│ │ │   ├── UNMET OPTIONAL DEPENDENCY jsbn@~0.1.0
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   └── [email protected]
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected] extraneous
└── [email protected] extraneous

@truckingsim
Copy link

truckingsim commented Oct 11, 2016

can confirm the same issue on a project with more packages. chokidar gets installed as a dependency of babel-cli and in my case also as a dependency of nunjucks. But chokidar does not show up on yarn ls under watchpack (which webpack depends on).

I get the same behavior running both yarn and yarn --flatten

edit: Also forgot to add this is on

@sebmck sebmck added the cat-bug label Oct 11, 2016
@wavded
Copy link

wavded commented Oct 11, 2016

I'm getting a similar issue with graceful-fs across a couple projects where it doesn't get installed.

Error: Cannot find module 'graceful-fs'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/wavded/Projects/fwwa/node_modules/enhanced-resolve/lib/NodeJsInputFileSystem.js:5:10)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
error Command failed with exit code 1.

@istarkov
Copy link

As a quik fix yarn add --dev chokidar && yarn add --optional fsevents solves webpack watch for me

@TheLarkInn
Copy link

TheLarkInn commented Oct 11, 2016

cc @TheLarkInn @bebraw @sokra @SpaceK33z to track this.

@janv
Copy link

janv commented Oct 12, 2016

I ran into the same issue.
After switching from npm to yarn, webpack was using 50% CPU.
Figured that fsevent wasn't used correctly/found by webpack(chokidar) anymore (although the package.json has no been touched when switching to yarn), so I added it as a dev dependency to my app.

  • Curiously, yarn install --production would also try to install fsevent. Since the server is linux, this fails.
  • fsevent is both a devDependency of my app and a transitive dependency of webpack -> watchpack -> chokidar
  • Different from the OP, chokidar was present in my node_modules

@outdooricon
Copy link

I had same experience as OP, chokidar is missing from node_modules but present in the lock

@TylerShin
Copy link

+1 with chokidar package

@hownowbrowncow
Copy link

I'm experiencing the same issue trying to work on https://github.com/hownowbrowncow/material-timepicker so if you want something to test against there is that. Running gulp will fail when watchify cannot find chokidar.

Let me know what else I can provide to help with the issue.

@istarkov
Copy link

istarkov commented Oct 12, 2016

I also found some problems with fsevents library, having the solution above
yarn add --dev chokidar && yarn add --optional fsevents.

After clean install

rm -rf node_modules
yarn

I does not see fsevents folder under node_modules even fsevents exists inside package.json as optional dependency

  "optionalDependencies": {
    "fsevents": "^1.0.14"
  }

So node takes 100+% cpu as chokidar starts to use polling instead of fs events.

But if I run yarn add --optional fsevents after yarn command, I see the fsevents folder under the node_modules and all cpu problems gone.

@thecommandline
Copy link

Same problem but with graceful-fs. I can use the resolved URL in the yarn.lock file to successfully download and extract it into node_modules manually.

@ffigiel
Copy link

ffigiel commented Oct 13, 2016

Not sure if it's related, but I'm getting same problems just when running yarn --production

@jounderwood
Copy link

I have same problem. When I try to install packages with production flag yarn install --prod it fails with error "Error: Cannot find module 'filename-regex'". When I run yarn install --prod again everything is ok. Error is raised only with "clean" install and production flag

@ffigiel
Copy link

ffigiel commented Oct 13, 2016

Looks like @andreysdr's and my comment should go to #761

@shepmaster
Copy link

shepmaster commented Oct 14, 2016

I believe that #670 helps narrow down a root cause - optional dependencies with native modules.

@newtriks
Copy link

+1 for chokidar package missing using webpack (watchpack).

@tomitrescak
Copy link

Yet installing it manually does not solve the problem:/

@steida
Copy link

steida commented Oct 18, 2016

It seems to be fixed for me. Node isn't at 100 % anymore.

@paradite
Copy link

@steida can you confirm that this was fixed by using a new release of yarn? seems like there was no pull request or official response.
using normal npm install is what I am doing now to avoid this issue.

@shepmaster
Copy link

As mentioned in the issue I believe this to be a duplicate of, the issue should be resolved via #809, which is committed in 558aa38 and available in v0.16.0.

@paradite
Copy link

@shepmaster thanks for the detailed response. I just updated to yarn 0.16.1 and the issue is indeed fixed. I think this issue can be safely closed.

@outdooricon
Copy link

Wasn't fixed for me as of 0.16, haven't been able to test with 0.16.1 yet.

@truckingsim
Copy link

This was fixed for me in 0.16 as well. Curious that its still not working for @outdooricon.

@philostler
Copy link

I'm using 0.16.1 and am seeing this issue. Experiencing a 2x jump in Webpack build times.

@outdooricon
Copy link

outdooricon commented Nov 1, 2016

Now works for me with 0.16.1!

@renaudguerin
Copy link

I'm seeing a similar issue on 0.16.1 and socket.io related dependencies (like json3)
Manually adding json3 yields yet another "Error: Cannot find module" missing dependency when running the app, so I didn't go all the way down the rabbit hole.
There definitely seems to be a problem with nested dependencies.

@vladshcherbin
Copy link

Back in 0.17.0 😕

@MoOx
Copy link

MoOx commented Nov 15, 2016

I opened #1838, I guess it's the same issue?

@kunalkapadia
Copy link

Facing this issue in 0.17.8 with --production flag
qs is not getting installed which is a dependency of request which in turn is my project's dependency.

@rosskevin
Copy link

I updated to 0.17.9 and it didn't seem fixed because my CPU still ran away.

Evidently I needed to clean the yarn cache as noted in this comment. When I did, all in CPU land was fixed.

brew update && brew upgrade yarn && rm -rf node_modules && yarn cache clean && yarn

@PixelJanitor
Copy link

PixelJanitor commented Dec 1, 2016

@rosskevin's suggestion worked for me for the CPU issue. If you've installed yarn via npm instead of homebrew:
npm update -g yarn
rm -rf node_modules
yarn cache clean
yarn
PROFIT

@eloytoro
Copy link

I can confirm this was fixed for me in yarn 0.18 but was definitely an issue in yarn 0.17.

@sairion
Copy link
Author

sairion commented Jan 17, 2017

Yeah, I recently started out using Yarn and I had no problem like above - I also tried to reproduce bug in 0.19.1 but it seems it's ok now. closing this.

@sairion sairion closed this as completed Jan 17, 2017
@jonleung
Copy link

jonleung commented Jul 6, 2017

Is anyone still experiencing this issue? I think I might be but need to really check all the nitty gritty details before I report that I am.

@rusenask
Copy link

rusenask commented Aug 6, 2017

I saw this issue again, seems like doing:

yarn add --dev chokidar && yarn add --optional fsevents

helped.

@KyleAMathews
Copy link

KyleAMathews commented Oct 6, 2017

It seems like this issue is showing up again in Yarn 1.1.0 & workspaces.

Consistently seeing problems on my Linux CI server building Gatsby sites.

EDIT: I fixed things by adding NODE_ENV=development before the install script.

@gandazgul
Copy link
Contributor

gandazgul commented Oct 11, 2017

I have this problem again with yarn 1.1.0 and now with 1.2.0 as well. I have a dependency that depends on a lot of babel packages. They are all installed except fro babel-loader. If I run yarn 0.27.5 babel-loader is installed, if I run yarn 1.2.0 only babel-loader is missing.

yarn list babel-loader says its there and the lock file mentions it the same way it does babel-cli for example. Yet loader is inside my-framework/node_modules whereas all other my-framework deps are outside in the root.

0.27.5:
$ ll ./node_modules | grep babel-loader
drwxr-xr-x 8 user 272 Oct 11 18:05 babel-loader
$ ll ./node_modules/framework/node_modules | grep babel-loader
[nothing]

1.2.0
$ ll ./node_modules | grep babel-loader
[nothing]
$ ll ./node_modules/framework/node_modules | grep babel-loader
drwxr-xr-x 8 user 272 Oct 11 18:05 babel-loader

@gandazgul
Copy link
Contributor

gandazgul commented Oct 24, 2017

I narrowed down the babel-loader issue to this PR. #4086 reverting the merge into master makes yarn behave like 0.27.5. I will investigate further what exactly is the bug. Somehow babel-loader is not being hoisted while other similar deps are.

You can reproduce this issue by adding react-scripts to a project, then run yarn to install. With 0.27.5 all react-scripts deps are hoisted including babel-loader, with yarn > 1.0 all are hoister except for babel-loader.

Pinpointed the offending code in line 332-344 in package-hoister.js, with the comment: we must not hoist a package higher than its peer dependencies

@arcanis @BYK What was the bug that #4086 was trying to fix? how do I reproduce it?

I have a fix but I don't know if it regresses the original problem.

Nevermind found repro steps: #3933. I can verify that with my fix the babel-loader issue is fixed and the repro steps on #3933 are still resolved as well. But it doesn't pass the unit test integration -> install should not hoist packages above their peer dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests