vpego
vpego

Reputation: 145

Error: Cannot find module 'semver'

I was working on a simple Ionic App.

Steps taken:

but then I tried to add the android platform:

ionic platform add android

and got this error:

ERROR: Cannot find module 'semver' at Function.Module._resolveFilename (module.js:336:15)

Caught exception: undefined

Any idea on why I'm getting this error and how to fix it?

Thanks!

Upvotes: 2

Views: 10462

Answers (2)

Justin Joseph
Justin Joseph

Reputation: 3919

i faced same issue and i fix with below coment

sudo rm -rf node_modules/ package-lock.json

Upvotes: 1

amuramoto
amuramoto

Reputation: 2848

Looks like you're just missing a node module dependency. Try running npm install semver inside your project dir.

Upvotes: 0

Related Questions