0

When I run cordova build ios it comes up with:

Cannot find module 'npm'

What should I look for to fix this?

mike nelson
  • 21,218
  • 14
  • 66
  • 75
  • Has it ever run successfully? I'm wondering if npm is in the NODE_PATH: https://stackoverflow.com/questions/12594541/npm-global-install-cannot-find-module – eb1 Jul 02 '19 at 17:19

1 Answers1

0

So, you are running cordova build on Mac. Firstly - you must install Node. Then check that cordova tools are installed.

Your issue 90% means, that some plugin ( firebase or similar more complex plugins ) tries to fetch node packages ( read as install the library to the native project ).

Developer
  • 4,158
  • 5
  • 34
  • 66
  • Yes I had it working previously and a Cordova build with no plugins works fine. It must be one of the plugins, but I am not sure which one. Once it’s in this state removing plugins doesn’t help and i am having to rebuild the project from scratch, multiple times to pinpoint it... not fun... – mike nelson Jul 04 '19 at 07:53
  • Just install node.js – Developer Jul 04 '19 at 14:48