Skip to content

Compatibility with Yarn PNP #62

@stephtr

Description

@stephtr

I'm currently using this package via Broccoli.
However it fails in my case by calling hashForDep('.yarn\cache\broccoli-babel-transpiler-npm-7.6.0-0caf4090d4-715d71cfe7.zip\node_modules\broccoli-babel-transpiler'):

.yarn\cache\resolve-package-path-npm-1.2.7-dae74e46b0-5467d60f85.zip\node_modules\resolve-package-path\index.js:58
                    throw e;
                    ^

TypeError: Cannot read property 'match' of undefined
    at Object.toPortablePath (.pnp.js:31159:9)
    at Object.resolveToUnqualified (.pnp.js:35642:54)
    at resolvePackagePath (.yarn\cache\resolve-package-path-npm-1.2.7-dae74e46b0-5467d60f85.zip\node_modules\resolve-package-path\index.js:48:23)
    at Function.ModuleEntry.locate (.yarn\cache\hash-for-dep-npm-1.5.1-cd643a5817-e1c64acc43.zip\node_modules\hash-for-dep\lib\module-entry.js:163:18)
    at hashForDep (.yarn\cache\hash-for-dep-npm-1.5.1-cd643a5817-e1c64acc43.zip\node_modules\hash-for-dep\index.js:66:35)

(It fails at pnp.resolveToUnqualified(target + '/package.json', basedir)). Is this command supposed to work for this argument, is this a bug of Yarn, this package or the broccoli plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions