Unable to create a new page IONIC 6 - ionic-framework

I updated my project from ionic 4 to 6 and after fixing everything.
not able to create a new page using ionic generate page
but it shows an error
An unhandled exception occurred: Package "#ionic/cordova-builders" was found but does not support schematics.
by far I've already deleted node_modules and intstalled all the packages again.
unable to figure out the issue.

Try using #ionic/angular-toolkit for the schematics.
{
"cli": {
"defaultCollection": "#ionic/angular-toolkit"
},
}

Related

IONIC 5 ionic serve produces Error: NGCC failed

I created a new ionic 5 project by using
ionic start myApp blank
When I run the project in browser using ionic serve it has given the following error
Error: NGCC failed
I figured out the problem my self
The problem was when I was installing the latest npm packages
it was installing the typescript: 4.0.2 and thats why the NGCC error
occured
run the following command and it will work,
npm i typescript#">=3.9.2 <4.0.0”
Or in future some one faces this error this is about the typescript version so just install the valid typescript and you will fix the ngcc error

TypeError: Cannot read property 'createHash' of undefined

This is an error regarding ionic, I have just upgraded from IONIC 4 to IONIC 5. I have also upgraded my nodejs to latest version 12.16.4. Now I am getting error while performing ionic serve on my ionic projects. Could you please help me out in this regard?

How to start IONIC application

I'm installing Ionic with the aim of learning this Framework, but I'm not getting results when I give the command ionic serve .... I get the following error: [ERROR] Sorry! ionic serve can only be run in an Ionic project directory.
error
While I create my project files, I do not know if these are well named .... I attach a photo of these
explorer
I have installed Node, Apache Cordova and Ionic ... I do not know what's happening ... any help for me?
Do that inside primerapp folder

ionic storage module giving OpaqueToken error with angular 5

I have updated my ionic project to angular 5 and i got the below error with many ionic native plugins..
angular/core/core"' has no exported member 'OpaqueToken
Resolved all of the issues after updating to the latest version , except for ionic-storage.
Still its giving this error
node_modules/#ionic/storage/es2015/storage.d.ts import { OpaqueToken }
from '#angular/core';
node_modules/#angular/core/core"' has no exported member 'OpaqueToken'.
We can see one open issue #github (142) but no fix or workaround found.
You can solve this issue by upgrading #ionic/storage to version 2.1.2 or higher.
Update (context):
OpaqueToken was removed in Angular v5 (it's been deprecated since
Angular v4). The corresponding change in the #ionic/storage package was done in this change as part of the 2.1.2 update.

ionic3 plugin and platform errors

I am using ionic CLI version 3.0.0-beta.5
When I am trying to install native plugins, I am getting these errors.
for example, installing social-sharing plugin
ionic plugin add cordova-plugin-x-socialsharing
and the error is
[ERROR] Unknown plugin: #ionic/cli-plugin-.
same error while adding platforms also..
C:\Users\varun\Desktop\apps\app>ionic platform add android
The platform command is no longer available. To find out more about the equivalent please run:
ionic cordova:platform --help
C:\Users\varun\Desktop\apps\app>ionic cordova:platform --help
[ERROR] Unable to find command: cordova:platform. It is possible that you are trying to get help on a project based command and you are not in a project directory.
Has anyone faced this problem? I am not getting enough information on official blog.
To fix "The platform command is no longer available" issue on Ionic3 beta 7 I tried the following:
ionic cordova:platform add android
However, it only worked for newly started projects so need to update ionic-scripts in your project.
Use this instead
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
The repo name cordova-plugin-x-socialsharing is changed/missing
so, we can directly add plugin from plugin git repo.
shareWithOptions(option, successcallback, errorcallback);
Usage :
window.plugins.socialsharing.shareWithOptions( {
message: 'share this',
subject: 'the subject',
files: ['', ''],
url: 'https://www.gooogle.com',
chooserTitle: 'Pick an app'
},
function(success){
console.log(success);
},
function(err){
console.log(err);});