page creation with ionic version 4 - ionic-framework

Hello dear community currently I work on my portfolio but with the version 4 of ionic I manage not to generate a new page by typing the command ionic generate page Contact.
Someone could help me
Voila l'erreur aprés avoir lancer la commande :
$ ionic generate page realisations
ng generate page realisations
Could not find module "#ionic/angular-toolkit" from "C:\wamp64\www\fil_Rouge\portfolioV4".
Error: Could not find module "#ionic/angular-toolkit" from "C:\wamp64\www\fil_Rouge\portfolioV4".
at Object.resolve (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\core\node\resolve.js:141:11)
at NodeModulesEngineHost._resolvePackageJson (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\node-module-engine-host.js:28:21)
at NodeModulesEngineHost._resolveCollectionPath (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\node-module-engine-host.js:69:40)
at NodeModulesEngineHost.createCollectionDescription (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\file-system-engine-host-base.js:111:27)
at SchematicEngine._createCollectionDescription (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\src\engine\engine.js:147:40)
at SchematicEngine.createCollection (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\src\engine\engine.js:140:43)

So it looks like there are a bunch of missing modules from your ionic installation. I recommend uninstalling ionic globally, re-installing it and then starting a new project. After that, move into the directory of the new project and come back with the output of the ionic info command.
Commands for reference:
npm uninstall -g ionic (Uninstalling Ionic from machine)
npm install -g ionic (Installing it globally)
ionic start blank myApp (starting new app)
cd myApp (change directory to application Mac/Linux/Windows Powershell)
ionic info (Get ionic information )

Related

How to build ionic1- project in ionic3 environment?

My boss gave me an ionic1 project, but my computer is the ionic3 environment. How can I package the project.
'python' : "v-2.7"
'node' : "v-8.9"
'cordova': 'v-7.1'
'ionic' : "v-3.18"
You have to just use this command
ionic start <YOUR APP NAME> --type=ionic1
hope this works for you
you can create new project from template also
ionic start [<project_name>] [<template>] --type=ionic1
example
ionic start myApp tabs --type=ionic1
for more info: https://ionicframework.com/docs/cli/start/
You can use the following code for building Ionic version 1 app in Ionic 3 environment
For sidemenu: ionic start yourappname sidemenu --type ionic1
For tabs: ionic start yourappname tabs --type ionic1

Visual studio 2015 First Ionic Application issue

I am new in Ionic,I have installed Ionic project template, android sdk and select a new ionic tab and also use below code:
npm install -g cordova ionic
Project Folder as below :
After then select Android and run project but is gives below screen.
I dont know what to do next, I have also install task runer.
Thanks.

How to keep both ionic 1, 3, version in my system

Initaially i was working with ionic 1.7.6 version with many apps. And by today some how i have changed to version 3.0.0. Now when i open my old projects under package.json i see the version as 3.0.0 instead of 1.7.6. And when i do sudo ionic build android it throws me some error to upgrade the version.
So now i have uninstall the ionic & cordova from my system.
Now i want to keep ionic 1 version 1.7.6 as well as ionic 3 version 3.0.0 how can i do it now.
so when ever i open the ionic 1 project i need to work on angularjs with ionic 1 version.
And when ever i open the project that i have created with version 3 i need to work with latest version of angular is with ionic 3..
please some one expalain me what should i need to do ??
Thank in advance !
I suspect you have installed ionic globally. If you want to run the local/project version of ionic you need to sudo ./node_modules/ionic/ionic ....
This will be the version of ionic as defined in the package.json of the project.
You can tuck this nicely away however using npm scripts (in your package.json):
e.g.
"scripts": {
"ionic": "sudo ./node_modules/ionic/ionic build "
}
Ten simply execute npm run ionic -- android

Ionic2 Build folder structure missing

I'm starting to learn Ionic2, I have created a new project with ionic start myproject --v2 and everything works correctly if I do ionic serve.
The build folder is missing in ionic 2 project folder.
Whenever I am trying to download any existing Ionic2 template in that one also build folder missing.
ionic -v 2.0.0-beta.30
cordova -v 6.2.0
node -v v6.2.1
npm -v 3.9.5
your ionic serve build is under www. The native builds ( from ionic build) are under platform.
A little late but I had the same issue and was able to fix it by installing Gulp :
npm install -g gulp
Then I did gulp build.
This solved my issues and generated the build folder as it was supposed to.
First you need to add support for the platform/s you are working with, by executing from Ionic CLI console:
ionic platform add android
or
ionic platform add ios
And then you should build your project by executing:
ionic build android
or
ionic build ios

Missing ionic.project file

I just updated nodejs ionic and cordova. Create new ionic project as before:
ionic start myApp blank
In terminal, go to myApp directory, and input:
ionic state
I got message:
You cannot run any state commands on a project that is not an Ionic
project. Try adding an ionic.project file or running ionic start to
get an application to save or restore (CLI v1.7.10)
My system information:
Cordova CLI: 5.4.0
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.1.0
Xcode version: Xcode 7.1.1 Build version 7B1005
Question: Where ionic.project file, I don't remember there was this file in project before. How to add ionic.project file?
How do I find this problem? Because I check out source from git, I try to use ionic state restore command to restore application for building. But I got same message, missing ioinc.project. So I create a new ionic project to find reason, but I'm still confused.
If use
ionic start
You will got
Invalid command (CLI v1.7.10)
Of course, there is not directory argument for this command. If you give directory as ./, this command only create and overwrite all project file.
screen shot
The new name of this file is ionic.config.json
I was facing the same issue.
just run the command
ionic serve
ionic.project file gets auto generated
EDIT
ionic.project is replace by ionic.config.json. So you should change in ionic.config.json
If you are happened to use ionic#beta, it won't install it until you downgrade it to ionic V1 then "ionic setup sass" or "ionic serve".
Most simple/easy solution to this problem to install a chrome extension named CORS. and everything will work perfectly.