Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.
This repository was archived by the owner on Dec 31, 2020. It is now read-only.

Problems getting mobx-react to work with yarn pnp #596

Closed
@marvinhagemeister

Description

@marvinhagemeister

At work we're huge fans of mobx and have been using it without any issues together with react. It's really awesome 👍

We're very excited about the recent work the yarn team did to speed up the package installation process with their recent Plug'n Play-effort, but we're running into an issue with mobx-react because it requires react-dom without declaring it a dependency.

This is the error message thrown by yarn:

ERROR in /Users/marvin.hagemeister/Library/Caches/Yarn/v3/npm-mobx-react-5.2.8-059c7f29254d7cd36e103d79113103b40348d3bf/node_modules/mobx-react/index.module.js
Module not found: Error: Package "[email protected]" (via "/Users/marvin.hagemeister/Library/Caches/Yarn/v3/npm-mobx-react-5.2.8-059c7f29254d7cd36e103d79113103b40348d3bf/node_modules/mobx-react/index.module.js") is trying to require the package "react-dom" (via "react-dom") without it being listed in its dependencies (mobx, react, hoist-non-react-statics, react-lifecycles-compat, mobx-react)
 @ /Users/marvin.hagemeister/Library/Caches/Yarn/v3/npm-mobx-react-5.2.8-059c7f29254d7cd36e103d79113103b40348d3bf/node_modules/mobx-react/index.module.js 3:0-65 639:8-19 641:19-30 1239:11-34 1239:82-105
 @ /Users/marvin.hagemeister/dev/my_project/packages/A/src/App.tsx
 @ /Users/marvin.hagemeister/dev/my_project/packages/A/src/index.tsx
 @ multi /Users/marvin.hagemeister/dev/my_project/.pnp/externals/pnp-adb3ce4a326ccce0073ebdd32468bb0fd11a2bbb/node_modules/webpack-dev-server/client?http://0.0.0.0:3010 (webpack)/hot/dev-server.js /Users/marvin.hagemeister/dev/my_project/packages/A/src/index.tsx

Summoning @arcanis as he does an awesome job at solving these kind of issues 🎉

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions