Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outdated/broken dependencies: Error: Cannot resolve module 'react/lib/ReactMount' #65

Open
Ploppz opened this issue May 8, 2020 · 2 comments

Comments

@Ploppz
Copy link

Ploppz commented May 8, 2020

Cloning and npm install ; npm start, I get this:

$ npm install ; npm start
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN The package prop-types is included as both a dev and production dependency.

added 479 packages from 364 contributors and audited 2961 packages in 10.24s

2 packages are looking for funding
  run `npm fund` for details

found 35 vulnerabilities (12 low, 22 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

> [email protected] start /tmp/react-treeview
> NODE_ENV=development node server.js

Listening at localhost:3000
Hash: c2b9c2c74bdb4c783932
Version: webpack 1.15.0
Time: 1673ms
    Asset    Size  Chunks       Chunk Names
bundle.js  1.5 MB       0       main
chunk    {0} bundle.js (main) 1.39 MB [rendered]

ERROR in ./demos/index.js
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /tmp/react-treeview/demos
 @ ./demos/index.js 1:250-281

ERROR in ./demos/controlled.js
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /tmp/react-treeview/demos
 @ ./demos/controlled.js 1:250-281

ERROR in ./demos/uncontrolled.js
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /tmp/react-treeview/demos
 @ ./demos/uncontrolled.js 1:250-281

ERROR in ./src/react-treeview.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /tmp/react-treeview/src
 @ ./src/react-treeview.jsx 1:250-281
webpack: Failed to compile.

I have tried a lot of things found around the web, like most things suggested here https://stackoverflow.com/questions/40652327/module-not-found-error-cannot-resolve-module-react-lib-reactmount which led to different errors, and trying to solve them trying things suggested here gaearon/react-hot-loader#569 which led to different errors described here gaearon/react-hot-loader#1411.

Maybe it would be best if someone with actual knowledge about the npm ecosystem could update this repo. It seems quite outdated.

@invokerzaa
Copy link

same question...

@invokerzaa
Copy link

it can fix like this:

1)npm install
2)in node_modules/react-hot-loader/index.js, replace " react/lib/ReactMount " to "react-dom"
3)npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants