babel / minify

:scissors: An ES6+ aware minifier based on the Babel toolchain (beta)
https://babeljs.io/repl
MIT License
4.39k stars 225 forks source link

Missing dependency in package json : Impossible to use in pnp #955

Closed crubier closed 5 years ago

crubier commented 5 years ago

Describe the bug

This plugin tries to import babel-helper-evaluate-path but does not list it in its dependencies

To Reproduce

Use in project with Yarn Pnp enabled

Actual Output

ERR! Error: Package "babel-plugin-minify-guarded-expressions@0.4.3" (via "/Users/vincent/Library/Caches/Yarn/v4/npm-babel-plugin-minify-guarded-expressions-0.4.3-cc709b4453fd21b1f302877444c89f88427ce397/node_modules/babel-plugin-minify-guarded-expressions/lib/index.js") is trying to require the package "babel-helper-evaluate-path" (via "babel-helper-evaluate-path") without it being listed in its dependencies (babel-helper-flip-expressions, babel-plugin-minify-guarded-expressions)

Expected Output

No error

Configuration

In a Yarn Pnp project

See this https://yarnpkg.com/en/docs/pnp/troubleshooting#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies

And ping @arcanis