Error: npm ERR! cb() never called!

What I Wanted to Do

Installing ‘react-router-dom’, but getting this error, instead:

npm ERR! cb() never called!

Then package.json shows the dependencies are installed, as:

"dependencies": {
    "react": "^16.8.6",
    "react-dom": "^16.8.6"
}

But when using import { BrowserRouter as Router, Link, Route, Switch, } from 'react-router-dom';

I get the following error:

Error in …/~/react-router-dom/cjs/react-router-dom.js
Module not found: ‘react’ in /Users/myUserName/myProjectName/node_modules/react-router-dom/cjs

@ …/~/react-router-dom/cjs/react-router-dom.js 7:28-44

Reproduction Steps

Details

Platform Info

$ npm --versions
 npm -versions
{ 'vets-tech-react': '0.1.0',
  npm: '6.9.0',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.1',
  openssl: '1.0.2m',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.47',
  zlib: '1.2.11' } 

$ node -p process.platform
returns: ```darwin```

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.