I having several ionic v1 project running.
And would like to try out the ionic v3 now, upgrade to ionic 3 successfully and can start and serve / build ionic 3 project properly.
But i found that all my existing ionic v1 project cannot serve or build anymore.
Tried some method i read online but still cannot solve it.
install or update @ionic/app-scripts
The only solution is I downgrade ionic 3 back to ionic 2 then only can run ionic 1 existing project properly.
This really stoping me to explore ionic v3 for my new project and appreciate if anyone got idea.
Error as per below
Error: Cannot find module '/Users/.../node_modules/@ionic/app-scripts'
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> (/Users/.../node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at Generator.next (<anonymous>)
at Promise (<anonymous>)
at Object.__awaiter (/Users/.../node_modules/tslib/tslib.js:103:16)
at Object.importAppScripts (/Users/.../node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
Well, most of the common command line available in Ionic 3 CLI would not make any sense in the context of Ionic 1 (AngularJS).
How does ionic generate component/page/provider make any sense in angularJS? AngularJS runs on service, factory and scope that doesn’t exist in Ionic 2 which is based on typescript?
While in the early days, ionic 2 CLI works with ionic 1 since you can specify the command ionic start myApp --v2 to indicate the project to be version 2 (and lack of --v2 assumes version 1), ionic 3 CLI no longer follow such a thing
@jchoh0522, you are wrong here. Current Ionic CLI works just fine with all Ionic projects - also v1. Even the current RC of Ionic CLI 4.x contains a parameter for start to create a new Ionic v1 project.
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v9.10.1
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
ANDROID_HOME : not set
backend : pro
It showing the app-script package was not installed.
Btw, I did try install by using sudo npm install @ionic/app-scripts@latest --save-dev
and received permission error.
app-scripts was installed properly on other ionic3 project.
I did try copy app-scripts folder from ionic3 project and try to run ionic build ios / android and receive error tsconfig.json’: ENOENT: no such file or directory
Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).
One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.
Thanks. the problem solved.
Re-install still cannot solve the problem.
I try start new ionic v1 project using cli command. Then copy all my coding from previous project to the new created project then everything working fine.