Skip to content

unrs-resolver fails to build under yarn pnp - undeclared dependency #105

@mrginglymus

Description

@mrginglymus
# This file contains the result of Yarn building a package (unrs-resolver@npm:1.7.1)
# Script name: postinstall

[napi-postinstall@0.2.1] Failed to find package "@unrs/resolver-binding-win32-x64-msvc" on the file system

This can happen if you use the "--no-optional" flag. The "optionalDependencies"
package.json feature is used by unrs-resolver to install the correct napi binary
for your current platform. This install script will now attempt to work around
this. If that fails, you need to remove the "--no-optional" flag to use unrs-resolver.

C:\Users\me\git\project\.pnp.cjs:12620
      Error.captureStackTrace(firstError);
            ^

Error: napi-postinstall tried to access unrs-resolver, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: unrs-resolver (via "unrs-resolver\package.json")
Required by: napi-postinstall@npm:0.2.1 (via C:\Users\me\AppData\Local\Yarn\Berry\cache\napi-postinstall-npm-0.2.1-d2e6d7f5f5-10c0.zip\node_modules\napi-postinstall\lib\)

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