Error: Cannot find module 'simctl'

I was running a previous version of Ionic (3.x) with the emulators no problems, Ionic asked me to update at some point saying a new version was out, I went to latest and somewhere things broke. I never really noticed because using serve I don’t have any problems but when I try to run emulate ios I get the issue below. I was previously using a npm command to reinstall ios-sim
cd platforms/ios/cordova/ && npm install ios-sim&latest
but even the above command no longer fixes my emulator issues.

I get the error below.

any help or suggestions. both emulators do not seem to be working anymore, where before I was using emulators on IOS and Android as well as live dev

** BUILD SUCCEEDED **

Error: Cannot find module ‘simctl’

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova emulate ios (exit code 1).

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! FabApp@0.0.1 ionic:emulate ios: ionic cordova emulate ios -lc
npm ERR! Exit status 1


global packages:

@ionic/cli-plugin-proxy : 1.3.2
@ionic/cli-utils        : 1.5.0
Cordova CLI             : 7.0.1 
Ionic CLI               : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.2
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.3

System:

Node       : v8.1.3
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
ios-sim    : 6.0.0 
npm        : 5.0.3

one thing to note, I made a new ionic project and the emulator works, so it may be a problem ‘inside’ my previous project / cordova / plugins / config / etc? but any help would be appreciated.

I would try removing and re-adding the ios platform then. Mostly it is in there, not in the Ionic part.

removed iOS, readded iOS, new error, cannot find module replace.

ran

cd platforms/ios/cordova/ && npm install ios-sim&latest

and now its working but I have a new error “Can’t find variable: webpackJsonp”

i was changing #'s in my package json trying to get a version that works to go so it might be something with that? at least im a tiny bit closer

and then fixed that with

src/index.html

<body>

  <!-- Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- The vendor js is generated during the build process
       It contains all of the dependencies in node_modules -->
  <script src="build/vendor.js"></script>

  <!-- The main bundle js is generated during the build process -->
  <script src="build/main.js"></script>

</body>

so i guess im good to go

1 Like