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 <jaeho@dev.fancy.com>",
  "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 yarnjs-bug-missing-deps@1.0.0: No license field
├─ abbrev@1.0.9
├─ ansi-regex@2.0.0
├─ ansi-styles@2.2.1
├─ anymatch@1.3.0
│  ├─ arrify@^1.0.0
│  └─ micromatch@^2.1.5
├─ aproba@1.0.4
├─ are-we-there-yet@1.1.2
│  ├─ delegates@^1.0.0
│  └─ readable-stream@^2.0.0 || ^1.1.13
├─ arr-diff@2.0.0
│  └─ arr-flatten@^1.0.1
├─ arr-flatten@1.0.1
├─ array-find-index@1.0.2
├─ array-uniq@1.0.3
├─ array-unique@0.2.1
├─ arrify@1.0.1
├─ asn1@0.2.3
├─ assert-plus@0.2.0
├─ async-each@1.0.1
├─ asynckit@0.4.0
├─ aws-sign2@0.6.0
├─ aws4@1.4.1
├─ babel-cli@6.16.0
│  ├─ 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
│  ├─ chalk@1.1.1
│  ├─ 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
├─ babel-code-frame@6.16.0
│  ├─ chalk@^1.1.0
│  ├─ chalk@1.1.3
│  │  ├─ 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
├─ babel-core@6.17.0
│  ├─ 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
├─ babel-generator@6.17.0
│  ├─ 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
├─ babel-helpers@6.16.0
│  ├─ babel-runtime@^6.0.0
│  └─ babel-template@^6.16.0
├─ babel-messages@6.8.0
│  └─ babel-runtime@^6.0.0
├─ babel-polyfill@6.16.0
│  ├─ babel-runtime@^6.9.1
│  ├─ core-js@^2.4.0
│  └─ regenerator-runtime@^0.9.5
├─ babel-register@6.16.3
│  ├─ 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
├─ babel-runtime@6.11.6
│  ├─ core-js@^2.4.0
│  └─ regenerator-runtime@^0.9.5
├─ babel-template@6.16.0
│  ├─ babel-runtime@^6.9.0
│  ├─ babel-traverse@^6.16.0
│  ├─ babel-types@^6.16.0
│  ├─ babylon@^6.11.0
│  └─ lodash@^4.2.0
├─ babel-traverse@6.16.0
│  ├─ 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
├─ babel-types@6.16.0
│  ├─ babel-runtime@^6.9.1
│  ├─ esutils@^2.0.2
│  ├─ lodash@^4.2.0
│  └─ to-fast-properties@^1.0.1
├─ babylon@6.11.4
├─ balanced-match@0.4.2
├─ bin-version-check@2.1.0
│  ├─ bin-version@^1.0.0
│  ├─ minimist@^1.1.0
│  ├─ semver-truncate@^1.0.0
│  └─ semver@^4.0.3
├─ bin-version@1.0.4
│  └─ find-versions@^1.0.0
├─ binary-extensions@1.7.0
├─ bl@1.1.2
│  ├─ readable-stream@~2.0.5
│  └─ readable-stream@2.0.6
│  │  ├─ 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
├─ block-stream@0.0.9
│  └─ inherits@~2.0.0
├─ boom@2.10.1
│  └─ hoek@2.x.x
├─ brace-expansion@1.1.6
│  ├─ balanced-match@^0.4.1
│  └─ concat-map@0.0.1
├─ braces@1.8.5
│  ├─ expand-range@^1.8.1
│  ├─ preserve@^0.2.0
│  └─ repeat-element@^1.1.2
├─ buffer-shims@1.0.0
├─ builtin-modules@1.1.1
├─ camelcase-keys@2.1.0
│  ├─ camelcase@^2.0.0
│  └─ map-obj@^1.0.0
├─ camelcase@2.1.1
├─ caseless@0.11.0
├─ chalk@1.1.1
│  ├─ 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
├─ code-point-at@1.0.1
│  └─ number-is-nan@^1.0.0
├─ combined-stream@1.0.5
│  └─ delayed-stream@~1.0.0
├─ commander@2.9.0
│  └─ graceful-readlink@>= 1.0.0
├─ concat-map@0.0.1
├─ console-control-strings@1.1.0
├─ convert-source-map@1.3.0
├─ core-js@2.4.1
├─ core-util-is@1.0.2
├─ cryptiles@2.0.5
│  └─ boom@2.x.x
├─ currently-unhandled@0.4.1
│  └─ array-find-index@^1.0.1
├─ dashdash@1.14.0
│  ├─ assert-plus@^1.0.0
│  └─ assert-plus@1.0.0
├─ debug@2.2.0
│  └─ ms@0.7.1
├─ decamelize@1.2.0
├─ deep-extend@0.4.1
├─ delayed-stream@1.0.0
├─ delegates@1.0.0
├─ detect-indent@3.0.1
│  ├─ get-stdin@^4.0.1
│  ├─ minimist@^1.1.0
│  └─ repeating@^1.1.0
├─ error-ex@1.3.0
│  └─ is-arrayish@^0.2.1
├─ escape-string-regexp@1.0.5
├─ esutils@2.0.2
├─ expand-brackets@0.1.5
│  └─ is-posix-bracket@^0.1.0
├─ expand-range@1.8.2
│  └─ fill-range@^2.1.0
├─ extend@3.0.0
├─ extglob@0.3.2
│  └─ is-extglob@^1.0.0
├─ extsprintf@1.0.2
├─ filename-regex@2.0.0
├─ fill-range@2.2.3
│  ├─ is-number@^2.1.0
│  ├─ isobject@^2.0.0
│  ├─ randomatic@^1.1.3
│  ├─ repeat-element@^1.1.2
│  └─ repeat-string@^1.5.2
├─ find-up@1.1.2
│  ├─ path-exists@^2.0.0
│  ├─ path-exists@2.1.0
│  │  └─ pinkie-promise@^2.0.0
│  └─ pinkie-promise@^2.0.0
├─ find-versions@1.2.1
│  ├─ array-uniq@^1.0.0
│  ├─ get-stdin@^4.0.1
│  ├─ meow@^3.5.0
│  └─ semver-regex@^1.0.0
├─ for-in@0.1.6
├─ for-own@0.1.4
│  └─ for-in@^0.1.5
├─ forever-agent@0.6.1
├─ form-data@2.0.0
│  ├─ asynckit@^0.4.0
│  ├─ combined-stream@^1.0.5
│  └─ mime-types@^2.1.11
├─ fs-readdir-recursive@0.1.2
├─ fs.realpath@1.0.0
├─ fstream-ignore@1.0.5
│  ├─ fstream@^1.0.0
│  ├─ inherits@2
│  └─ minimatch@^3.0.0
├─ fstream@1.0.10
│  ├─ graceful-fs@^4.1.2
│  ├─ inherits@~2.0.0
│  ├─ mkdirp@>=0.5 0
│  └─ rimraf@2
├─ gauge@2.6.0
│  ├─ 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
├─ generate-function@2.0.0
├─ generate-object-property@1.2.0
│  └─ is-property@^1.0.0
├─ get-stdin@4.0.1
├─ getpass@0.1.6
│  ├─ assert-plus@^1.0.0
│  └─ assert-plus@1.0.0
├─ glob-base@0.3.0
│  ├─ glob-parent@^2.0.0
│  └─ is-glob@^2.0.0
├─ glob-parent@2.0.0
│  └─ is-glob@^2.0.0
├─ glob@5.0.15
│  ├─ inflight@^1.0.4
│  ├─ inherits@2
│  ├─ minimatch@2 || 3
│  ├─ once@^1.3.0
│  └─ path-is-absolute@^1.0.0
├─ globals@8.18.0
├─ graceful-fs@4.1.9
├─ graceful-readlink@1.0.1
├─ har-validator@2.0.6
│  ├─ chalk@^1.1.1
│  ├─ chalk@1.1.3
│  │  ├─ 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
├─ has-ansi@2.0.0
│  └─ ansi-regex@^2.0.0
├─ has-color@0.1.7
├─ has-unicode@2.0.1
├─ hawk@3.1.3
│  ├─ boom@2.x.x
│  ├─ cryptiles@2.x.x
│  ├─ hoek@2.x.x
│  └─ sntp@1.x.x
├─ hoek@2.16.3
├─ home-or-tmp@1.0.0
│  ├─ os-tmpdir@^1.0.1
│  └─ user-home@^1.1.1
├─ hosted-git-info@2.1.5
├─ http-signature@1.1.1
│  ├─ assert-plus@^0.2.0
│  ├─ jsprim@^1.2.2
│  └─ sshpk@^1.7.0
├─ indent-string@2.1.0
│  ├─ repeating@^2.0.0
│  └─ repeating@2.0.1
│  │  └─ is-finite@^1.0.0
├─ inflight@1.0.5
│  ├─ once@^1.3.0
│  └─ wrappy@1
├─ inherits@2.0.3
├─ ini@1.3.4
├─ invariant@2.2.1
│  └─ loose-envify@^1.0.0
├─ is-arrayish@0.2.1
├─ is-binary-path@1.0.1
│  └─ binary-extensions@^1.0.0
├─ is-buffer@1.1.4
├─ is-builtin-module@1.0.0
│  └─ builtin-modules@^1.0.0
├─ is-dotfile@1.0.2
├─ is-equal-shallow@0.1.3
│  └─ is-primitive@^2.0.0
├─ is-extendable@0.1.1
├─ is-extglob@1.0.0
├─ is-finite@1.0.2
│  └─ number-is-nan@^1.0.0
├─ is-fullwidth-code-point@1.0.0
│  └─ number-is-nan@^1.0.0
├─ is-glob@2.0.1
│  └─ is-extglob@^1.0.0
├─ is-my-json-valid@2.15.0
│  ├─ generate-function@^2.0.0
│  ├─ generate-object-property@^1.1.0
│  ├─ jsonpointer@^4.0.0
│  └─ xtend@^4.0.0
├─ is-number@2.1.0
│  └─ kind-of@^3.0.2
├─ is-posix-bracket@0.1.1
├─ is-primitive@2.0.0
├─ is-property@1.0.2
├─ is-typedarray@1.0.0
├─ is-utf8@0.2.1
├─ isarray@1.0.0
├─ isobject@2.1.0
│  └─ isarray@1.0.0
├─ isstream@0.1.2
├─ js-tokens@2.0.0
├─ jsesc@1.3.0
├─ json-schema@0.2.3
├─ json-stringify-safe@5.0.1
├─ json5@0.4.0
├─ jsonpointer@4.0.0
├─ jsprim@1.3.1
│  ├─ extsprintf@1.0.2
│  ├─ json-schema@0.2.3
│  └─ verror@1.3.6
├─ kind-of@3.0.4
│  └─ is-buffer@^1.0.2
├─ load-json-file@1.1.0
│  ├─ graceful-fs@^4.1.2
│  ├─ parse-json@^2.2.0
│  ├─ pify@^2.0.0
│  ├─ pinkie-promise@^2.0.0
│  └─ strip-bom@^2.0.0
├─ lodash@4.16.4
├─ log-symbols@1.0.2
│  ├─ chalk@^1.0.0
│  └─ chalk@1.1.3
│  │  ├─ 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
├─ loose-envify@1.2.0
│  ├─ js-tokens@^1.0.1
│  └─ js-tokens@1.0.3
├─ loud-rejection@1.6.0
│  ├─ currently-unhandled@^0.4.1
│  └─ signal-exit@^3.0.0
├─ map-obj@1.0.1
├─ meow@3.7.0
│  ├─ 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
├─ micromatch@2.3.11
│  ├─ 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
├─ mime-db@1.24.0
├─ mime-types@2.1.12
│  └─ mime-db@~1.24.0
├─ minimatch@3.0.3
│  └─ brace-expansion@^1.0.0
├─ minimist@1.2.0
├─ mkdirp@0.5.1
│  ├─ minimist@0.0.8
│  └─ minimist@0.0.8
├─ ms@0.7.1
├─ nan@2.4.0
├─ node-pre-gyp@0.6.30
│  ├─ mkdirp@~0.5.0
│  ├─ nopt@~3.0.1
│  ├─ npmlog@4.x
│  ├─ rc@~1.1.0
│  ├─ request@2.x
│  ├─ rimraf@~2.5.0
│  ├─ semver@~5.3.0
│  ├─ semver@5.3.0
│  ├─ tar-pack@~3.1.0
│  └─ tar@~2.2.0
├─ node-uuid@1.4.7
├─ nopt@3.0.6
│  └─ abbrev@1
├─ normalize-package-data@2.3.5
│  ├─ hosted-git-info@^2.1.4
│  ├─ is-builtin-module@^1.0.0
│  ├─ semver@2 || 3 || 4 || 5
│  ├─ semver@5.3.0
│  └─ validate-npm-package-license@^3.0.1
├─ normalize-path@2.0.1
├─ npmlog@4.0.0
│  ├─ are-we-there-yet@~1.1.2
│  ├─ console-control-strings@~1.1.0
│  ├─ gauge@~2.6.0
│  └─ set-blocking@~2.0.0
├─ number-is-nan@1.0.1
├─ oauth-sign@0.8.2
├─ object-assign@4.1.0
├─ object.omit@2.0.0
│  ├─ for-own@^0.1.3
│  └─ is-extendable@^0.1.1
├─ once@1.4.0
│  └─ wrappy@1
├─ os-tmpdir@1.0.2
├─ output-file-sync@1.1.2
│  ├─ graceful-fs@^4.1.4
│  ├─ mkdirp@^0.5.1
│  └─ object-assign@^4.1.0
├─ parse-glob@3.0.4
│  ├─ glob-base@^0.3.0
│  ├─ is-dotfile@^1.0.0
│  ├─ is-extglob@^1.0.0
│  └─ is-glob@^2.0.0
├─ parse-json@2.2.0
│  └─ error-ex@^1.2.0
├─ path-exists@1.0.0
├─ path-is-absolute@1.0.1
├─ path-type@1.1.0
│  ├─ graceful-fs@^4.1.2
│  ├─ pify@^2.0.0
│  └─ pinkie-promise@^2.0.0
├─ pify@2.3.0
├─ pinkie-promise@2.0.1
│  └─ pinkie@^2.0.0
├─ pinkie@2.0.4
├─ preserve@0.2.0
├─ private@0.1.6
├─ process-nextick-args@1.0.7
├─ qs@6.2.1
├─ randomatic@1.1.5
│  ├─ is-number@^2.0.2
│  └─ kind-of@^3.0.2
├─ rc@1.1.6
│  ├─ deep-extend@~0.4.0
│  ├─ ini@~1.3.0
│  ├─ minimist@^1.2.0
│  └─ strip-json-comments@~1.0.4
├─ read-pkg-up@1.0.1
│  ├─ find-up@^1.0.0
│  └─ read-pkg@^1.0.0
├─ read-pkg@1.1.0
│  ├─ load-json-file@^1.0.0
│  ├─ normalize-package-data@^2.3.2
│  └─ path-type@^1.0.0
├─ readable-stream@2.1.5
│  ├─ 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
├─ readdirp@2.1.0
│  ├─ graceful-fs@^4.1.2
│  ├─ minimatch@^3.0.2
│  ├─ readable-stream@^2.0.2
│  └─ set-immediate-shim@^1.0.1
├─ redent@1.0.0
│  ├─ indent-string@^2.1.0
│  └─ strip-indent@^1.0.1
├─ regenerator-runtime@0.9.5
├─ regex-cache@0.4.3
│  ├─ is-equal-shallow@^0.1.3
│  └─ is-primitive@^2.0.0
├─ repeat-element@1.1.2
├─ repeat-string@1.5.4
├─ repeating@1.1.3
│  └─ is-finite@^1.0.0
├─ request@2.75.0
│  ├─ 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
├─ rimraf@2.5.4
│  ├─ glob@^7.0.5
│  └─ glob@7.1.1
│  │  ├─ 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
├─ semver-regex@1.0.0
├─ semver-truncate@1.1.2
│  ├─ semver@^5.3.0
│  └─ semver@5.3.0
├─ semver@4.3.6
├─ set-blocking@2.0.0
├─ set-immediate-shim@1.0.1
├─ shebang-regex@1.0.0
├─ signal-exit@3.0.1
├─ slash@1.0.0
├─ sntp@1.0.9
│  └─ hoek@2.x.x
├─ source-map-support@0.4.3
│  └─ source-map@^0.5.3
├─ source-map@0.5.6
├─ spdx-correct@1.0.2
│  └─ spdx-license-ids@^1.0.2
├─ spdx-expression-parse@1.0.4
├─ spdx-license-ids@1.2.2
├─ sshpk@1.10.1
│  ├─ asn1@~0.2.3
│  ├─ assert-plus@^1.0.0
│  ├─ assert-plus@1.0.0
│  ├─ 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
├─ string_decoder@0.10.31
├─ string-width@1.0.2
│  ├─ code-point-at@^1.0.0
│  ├─ is-fullwidth-code-point@^1.0.0
│  └─ strip-ansi@^3.0.0
├─ stringstream@0.0.5
├─ strip-ansi@3.0.1
│  └─ ansi-regex@^2.0.0
├─ strip-bom@2.0.0
│  └─ is-utf8@^0.2.0
├─ strip-indent@1.0.1
│  └─ get-stdin@^4.0.1
├─ strip-json-comments@1.0.4
├─ supports-color@2.0.0
├─ tar-pack@3.1.4
│  ├─ debug@~2.2.0
│  ├─ fstream-ignore@~1.0.5
│  ├─ fstream@~1.0.10
│  ├─ once@~1.3.3
│  ├─ once@1.3.3
│  │  └─ wrappy@1
│  ├─ readable-stream@~2.1.4
│  ├─ rimraf@~2.5.1
│  ├─ tar@~2.2.1
│  └─ uid-number@~0.0.6
├─ tar@2.2.1
│  ├─ block-stream@*
│  ├─ fstream@^1.0.2
│  └─ inherits@2
├─ to-fast-properties@1.0.2
├─ tough-cookie@2.3.1
├─ trim-newlines@1.0.0
├─ tunnel-agent@0.4.3
├─ tweetnacl@0.14.3
├─ uid-number@0.0.6
├─ user-home@1.1.1
├─ util-deprecate@1.0.2
├─ v8flags@2.0.11
│  └─ user-home@^1.1.1
├─ validate-npm-package-license@3.0.1
│  ├─ spdx-correct@~1.0.0
│  └─ spdx-expression-parse@~1.0.0
├─ verror@1.3.6
│  └─ extsprintf@1.0.2
├─ wide-align@1.1.0
│  └─ string-width@^1.0.1
├─ wrappy@1.0.2
└─ xtend@4.0.1

@sairion
Copy link
Author

sairion commented Oct 11, 2016

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

yarnjs-bug-missing-deps@1.0.0 /Users/user/yarnjs-bug-missing-deps
├── anymatch@1.3.0 extraneous
├── async-each@1.0.1 extraneous
├─┬ babel-cli@6.16.0
│ ├─┬ babel-core@6.17.0
│ │ ├─┬ babel-code-frame@6.16.0
│ │ │ ├── chalk@1.1.3
│ │ │ ├── esutils@2.0.2
│ │ │ └── js-tokens@2.0.0
│ │ ├─┬ babel-generator@6.17.0
│ │ │ ├─┬ detect-indent@3.0.1
│ │ │ │ ├── get-stdin@4.0.1
│ │ │ │ └─┬ repeating@1.1.3
│ │ │ │   └─┬ is-finite@1.0.2
│ │ │ │     └── number-is-nan@1.0.1
│ │ │ └── jsesc@1.3.0
│ │ ├── babel-helpers@6.16.0
│ │ ├── babel-messages@6.8.0
│ │ ├── babel-template@6.16.0
│ │ ├─┬ babel-traverse@6.16.0
│ │ │ ├── globals@8.18.0
│ │ │ └─┬ invariant@2.2.1
│ │ │   └─┬ loose-envify@1.2.0
│ │ │     └── js-tokens@1.0.3
│ │ ├─┬ babel-types@6.16.0
│ │ │ └── to-fast-properties@1.0.2
│ │ ├── babylon@6.11.4
│ │ ├─┬ debug@2.2.0
│ │ │ └── ms@0.7.1
│ │ ├── json5@0.4.0
│ │ ├─┬ minimatch@3.0.3
│ │ │ └─┬ brace-expansion@1.1.6
│ │ │   ├── balanced-match@0.4.2
│ │ │   └── concat-map@0.0.1
│ │ ├── private@0.1.6
│ │ └── shebang-regex@1.0.0
│ ├─┬ babel-polyfill@6.16.0
│ │ ├── core-js@2.4.1
│ │ └── regenerator-runtime@0.9.5
│ ├─┬ babel-register@6.16.3
│ │ ├─┬ home-or-tmp@1.0.0
│ │ │ └── os-tmpdir@1.0.2
│ │ ├─┬ mkdirp@0.5.1
│ │ │ └── minimist@0.0.8
│ │ └── source-map-support@0.4.3
│ ├── babel-runtime@6.11.6
│ ├─┬ bin-version-check@2.1.0
│ │ ├─┬ bin-version@1.0.4
│ │ │ └─┬ find-versions@1.2.1
│ │ │   ├── array-uniq@1.0.3
│ │ │   ├─┬ meow@3.7.0
│ │ │   │ ├─┬ camelcase-keys@2.1.0
│ │ │   │ │ └── camelcase@2.1.1
│ │ │   │ ├── decamelize@1.2.0
│ │ │   │ ├─┬ loud-rejection@1.6.0
│ │ │   │ │ ├─┬ currently-unhandled@0.4.1
│ │ │   │ │ │ └── array-find-index@1.0.2
│ │ │   │ │ └── signal-exit@3.0.1
│ │ │   │ ├── map-obj@1.0.1
│ │ │   │ ├─┬ normalize-package-data@2.3.5
│ │ │   │ │ ├── hosted-git-info@2.1.5
│ │ │   │ │ ├─┬ is-builtin-module@1.0.0
│ │ │   │ │ │ └── builtin-modules@1.1.1
│ │ │   │ │ ├── semver@5.3.0
│ │ │   │ │ └─┬ validate-npm-package-license@3.0.1
│ │ │   │ │   ├─┬ spdx-correct@1.0.2
│ │ │   │ │   │ └── spdx-license-ids@1.2.2
│ │ │   │ │   └── spdx-expression-parse@1.0.4
│ │ │   │ ├─┬ read-pkg-up@1.0.1
│ │ │   │ │ ├─┬ find-up@1.1.2
│ │ │   │ │ │ └── path-exists@2.1.0
│ │ │   │ │ └─┬ read-pkg@1.1.0
│ │ │   │ │   ├─┬ load-json-file@1.1.0
│ │ │   │ │   │ ├─┬ parse-json@2.2.0
│ │ │   │ │   │ │ └─┬ error-ex@1.3.0
│ │ │   │ │   │ │   └── is-arrayish@0.2.1
│ │ │   │ │   │ ├── pify@2.3.0
│ │ │   │ │   │ └─┬ strip-bom@2.0.0
│ │ │   │ │   │   └── is-utf8@0.2.1
│ │ │   │ │   └── path-type@1.1.0
│ │ │   │ ├─┬ redent@1.0.0
│ │ │   │ │ ├─┬ indent-string@2.1.0
│ │ │   │ │ │ └── repeating@2.0.1
│ │ │   │ │ └── strip-indent@1.0.1
│ │ │   │ └── trim-newlines@1.0.0
│ │ │   └── semver-regex@1.0.0
│ │ ├── minimist@1.2.0
│ │ ├── semver@4.3.6
│ │ └─┬ semver-truncate@1.1.2
│ │   └── semver@5.3.0
│ ├─┬ chalk@1.1.1
│ │ ├── ansi-styles@2.2.1
│ │ ├── escape-string-regexp@1.0.5
│ │ ├─┬ has-ansi@2.0.0
│ │ │ └── ansi-regex@2.0.0
│ │ ├── strip-ansi@3.0.1
│ │ └── supports-color@2.0.0
│ ├── UNMET OPTIONAL DEPENDENCY chokidar@^1.0.0
│ ├─┬ commander@2.9.0
│ │ └── graceful-readlink@1.0.1
│ ├── convert-source-map@1.3.0
│ ├── fs-readdir-recursive@0.1.2
│ ├─┬ glob@5.0.15
│ │ ├─┬ inflight@1.0.5
│ │ │ └── wrappy@1.0.2
│ │ ├── inherits@2.0.3
│ │ └── once@1.4.0
│ ├── lodash@4.16.4
│ ├─┬ log-symbols@1.0.2
│ │ └── chalk@1.1.3
│ ├─┬ output-file-sync@1.1.2
│ │ ├── graceful-fs@4.1.9
│ │ └── object-assign@4.1.0
│ ├── path-exists@1.0.0
│ ├── path-is-absolute@1.0.1
│ ├─┬ request@2.75.0
│ │ ├── aws-sign2@0.6.0
│ │ ├── aws4@1.4.1
│ │ ├─┬ bl@1.1.2
│ │ │ └─┬ readable-stream@2.0.6
│ │ │   ├── core-util-is@1.0.2
│ │ │   ├── isarray@1.0.0
│ │ │   ├── process-nextick-args@1.0.7
│ │ │   ├── string_decoder@0.10.31
│ │ │   └── util-deprecate@1.0.2
│ │ ├── caseless@0.11.0
│ │ ├─┬ combined-stream@1.0.5
│ │ │ └── delayed-stream@1.0.0
│ │ ├── extend@3.0.0
│ │ ├── forever-agent@0.6.1
│ │ ├─┬ form-data@2.0.0
│ │ │ └── asynckit@0.4.0
│ │ ├─┬ har-validator@2.0.6
│ │ │ ├── chalk@1.1.3
│ │ │ ├─┬ is-my-json-valid@2.15.0
│ │ │ │ ├── generate-function@2.0.0
│ │ │ │ ├─┬ generate-object-property@1.2.0
│ │ │ │ │ └── is-property@1.0.2
│ │ │ │ ├── jsonpointer@4.0.0
│ │ │ │ └── xtend@4.0.1
│ │ │ └─┬ pinkie-promise@2.0.1
│ │ │   └── pinkie@2.0.4
│ │ ├─┬ hawk@3.1.3
│ │ │ ├── boom@2.10.1
│ │ │ ├── cryptiles@2.0.5
│ │ │ ├── hoek@2.16.3
│ │ │ └── sntp@1.0.9
│ │ ├─┬ http-signature@1.1.1
│ │ │ ├── assert-plus@0.2.0
│ │ │ ├─┬ jsprim@1.3.1
│ │ │ │ ├── extsprintf@1.0.2
│ │ │ │ ├── json-schema@0.2.3
│ │ │ │ └── verror@1.3.6
│ │ │ └─┬ sshpk@1.10.1
│ │ │   ├── asn1@0.2.3
│ │ │   ├── assert-plus@1.0.0
│ │ │   ├── UNMET OPTIONAL DEPENDENCY bcrypt-pbkdf@^1.0.0
│ │ │   ├─┬ dashdash@1.14.0
│ │ │   │ └── assert-plus@1.0.0
│ │ │   ├── UNMET OPTIONAL DEPENDENCY ecc-jsbn@~0.1.1
│ │ │   ├─┬ getpass@0.1.6
│ │ │   │ └── assert-plus@1.0.0
│ │ │   ├── UNMET OPTIONAL DEPENDENCY jodid25519@^1.0.0
│ │ │   ├── UNMET OPTIONAL DEPENDENCY jsbn@~0.1.0
│ │ │   └── tweetnacl@0.14.3
│ │ ├── is-typedarray@1.0.0
│ │ ├── isstream@0.1.2
│ │ ├── json-stringify-safe@5.0.1
│ │ ├─┬ mime-types@2.1.12
│ │ │ └── mime-db@1.24.0
│ │ ├── node-uuid@1.4.7
│ │ ├── oauth-sign@0.8.2
│ │ ├── qs@6.2.1
│ │ ├── stringstream@0.0.5
│ │ ├── tough-cookie@2.3.1
│ │ └── tunnel-agent@0.4.3
│ ├── slash@1.0.0
│ ├── source-map@0.5.6
│ └─┬ v8flags@2.0.11
│   └── user-home@1.1.1
├── is-binary-path@1.0.1 extraneous
├── nan@2.4.0 extraneous
├── node-pre-gyp@0.6.30 extraneous
└── readdirp@2.1.0 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