So I am new to Ionic 2 and Angular 2. I followed http://ionicframework.com/docs/v2/getting-started/tutorial/ and ran the command ionic start MyIonic2Project tutorial --v2 and it created the directory with correct files. When I ran the ionic serve nothing worked. I thought ionic serve command would transpile the ts and move correct files to www folder. I guess I was kidding myself. So I used gulp to move and transpiled ts files and also move them to www folder then updated the references to index.html page, but now I get âUncaught ReferenceError: require is not definedâ.
You are not supposed to do any manual steps of using gulp.
Once you run the Ionic Serve the build process creates a build folder under www with the transpiled files and other files needed to run the app.
After you run Ionic Serve you have to use the chrome debugger (Developer Tools) and view the console for any errors.
I created a new ionic 2 project and gave me a âNo gulpfile found!â warning and thatâs all. When I do ionic serve command it gave me an error 'Error: ENOENT: no such file or directory, open âC:\Temp\ionic2\MyIonic2Project\www\index.htmlâ
Thatâs all I get on the page. No error else where
Odd, that suggests it may have created an Ionic 1 project, not an Ionic 2 one. Ionic 1 uses Gulp, Ionic 2 doesnât. Does the project have an ionic.config.json file containing "v2": true?
Which version of the Ionic CLI do you have installed? You can check by running ionic -v.
Oh, I thought this statement also should be applied for ionic cli 1
Important: if you have installed the beta cli you should run npm uninstall -g ionic first. You need version 2.1.0 for this release. Check your cli version by running ionic -v in the command line.