I am working on multiple projects, some of which use Ionic 1 and others that use Ionic 4. However, switching between them has become a problem. After updating Ionic CLI to the latest and working on 4 I am now trying to work on an older Ionic 1.
The problem is every time I run ionic serve
I get the following:
Error: spawn ENOTDIR
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at spawn (/usr/local/lib/node_modules/ionic/node_modules/cross-spawn/index.js:17:18)
at spawn (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-framework/utils/shell.js:124:12)
at ShellCommand.spawn (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-framework/utils/shell.js:113:16)
at Shell.spawn (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/shell.js:136:23)
at Ionic1ServeCLI.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/serve.js:398:36)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:104:62)
I have tried various solutions such as this and this and this with no luck.
I have also tried updating my npm dependencies with no luck.
cordova ^7.1.0 → ^8.0.0
cordova-android ^6.3.0 → ^7.1.1
cordova-plugin-device ^1.1.7 → ^2.0.2
cordova-plugin-file ^5.0.0 → ^6.0.1
cordova-plugin-inappbrowser ^1.7.2 → ^3.0.0
cordova-plugin-network-information ^1.3.4 → ^2.0.1
cordova-plugin-screen-orientation ^2.0.2 → ^3.0.1
cordova-plugin-splashscreen ^4.1.0 → ^5.0.2
gulp-sass ^3.1.0 → ^4.0.1
From what I can tell the documentation shows the latest CLI is backwards compatible.
EDIT:
ionic info:
Ionic:
ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.3
@ionic/v1-toolkit : not installed
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 6.3.0
Cordova Plugins : no whitelisted plugins (13 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/jrquick/Library/Android/sdk)
NodeJS : v8.9.2 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS High Sierra