Error: Cannot find module @ionic/cli-utils

Viewed 2710

I'm trying to run ionic in terminal and am getting the following error:

module.js:487
    throw err;
    ^

Error: Cannot find module '@ionic/cli-utils'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/ionic/dist/index.js:14:21)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

I've looked around on google but can't find any reason for the error. Any ideas?

3 Answers

It also happened to me when updating new version. Solved It as:

  1. Delete node_modules
  2. Delete package-lock.json file
  3. Run npm install command
  4. ionic serve
Related