0

When I try to start my program, the npm throws the following error (look below), none of the npm commands can solve the problem. Even if I type $ npm -v only this message shows up. I have macOs mojave, and Node 10.15.3

Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
MacBook-Pro:zerosBuild Francis$
Francis
  • 1
  • 2
  • 1
    Searching for "Error: Cannot find module 'semver'" seems to show other posts.... – epascarello May 23 '19 at 19:25
  • Possible duplicate https://stackoverflow.com/questions/33870520/npm-install-cannot-find-module-semver – udalmik May 23 '19 at 19:27
  • 2
    Possible duplicate of [Npm install cannot find module 'semver'](https://stackoverflow.com/questions/33870520/npm-install-cannot-find-module-semver) – Randy Casburn May 23 '19 at 19:29
  • Did you include `semver` deliberately as a dependency (in your `package.json`), or is it a downstream dependency? – arthurakay May 23 '19 at 20:46

0 Answers0