Skip to content

Error running in yarn due to undeclared dependency #268

@dobesv

Description

@dobesv

Yarn is strict about using dependencies that are not declared in package.json - if a file imports or requires a module it must be declared in that file's package.json. This differs from npm where a module could use the dependencies of its dependencies freely.

 yarn run happo dev
Starting: [main] Searching for happo test files... 
✗ [main] Searching for happo test files...: Error: happo.io tried to access react-dom, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: react-dom
Required by: happo.io@virtual:0b8541be94c07b03e28e04a869f424dd9b9352f559e63e47625f947ec9ee14213658be2582b051a033b49b2f2beeedb9f8fde576b107aac3aa921ebdc44b4415#npm:9.1.2

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