This may be just my lack of experience working with ionic 2 but I'm getting an error when tying to generate pages via the CLI.
The syntax I'm using: "ionic g page TestPage"
It returns an error (below). Does anyone know how to resolve this error? It seems the "templates" directory does not exist on my machine which I gather is why this is happening, but not sure how to get it there or fix the issue. The first part of the path does exist: C:\apps\sampleapp\node_modules\ionic-angular\, but not the "templates/page" part.
Error: ENOENT: no such file or directory, scandir 'C:\apps\sampleapp\node_modules\ionic-angular\templates\page'
at Error (native)
at Object.fs.readdirSync (fs.js:808:18)
at getTemplatesInDir (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\app-generator
at Generator.renderAndWriteTemplates (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\@ion
at C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\app-generators\index.js:25304:26
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0-beta.1
Ionic App Lib Version: 2.1.0-beta.0
OS: Windows 8.1
Node Version: v4.5.0
Downgrade your ionic version to beta 22.. I think it works by uninstalling and then updating npm just in case and then reinstalling a lower ionic version.
How do you completely remove Ionic and Cordova installation from mac?
And I would suggest trying "npm install" in the project directory after this too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With