I’m not able to create a new app with Ionic 3.20.1
Once I’ve chosen the template the console hangs and nothing else happens. Only an empty folder is created. BUT It’s going well with Ionic 4.
I also tried to run ionic start myApp blank and it loaded something into the folder BUT it stopped again after the next choosing step.
Could please anyone help me with this issue? I really need to use Ionic 3, but how to fix this?
Ionic 3.20.1
Cordova 8.1.2
Node.js 10.14.2
Thank you!
The console look
Upd: ionic info --verbose output:
[DEBUG] Reason for not using local CLI: BASE_DIRECTORY_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'D:\\...', local: false, binPath:
'C:\\...\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
'C:\\...\\npm\\node_modules\\ionic\\dist\\index.js' }
[WARN] You are not in an Ionic project directory. Project context may be missing.
cli packages: (C:\...\npm\node_modules)
#ionic/cli-utils : 1.19.3
ionic (Ionic CLI) : 3.20.1
System:
Node : v10.14.2
npm : 6.5.0
OS : Windows 10
Misc:
backend : pro
The problem was node.js. I had to downgrade it v10->v8 and now it's working.
Related
I'm working with Ionic3: (version 4 is Beta yet)
Ionic:
ionic (Ionic CLI) : 4.5.0
System:
NodeJS : v8.13.0
npm : 6.4.1
OS : Linux 4.13
And I try to run a confirmed project from github (320 stars), so the npm i goes OK, but When I try to run the App I've got a strange Error:
ionic cordova run android
[ERROR] Sorry! ionic cordova run can only be run in an Ionic project directory.
If this is a project you'd like to integrate with Ionic, create an
ionic.config.json file.
So What Should I do ? if I have to create a file as recommended what I will put into it ?
I have searched all over to get this answer but nothing works.
I am building an iPad app in Ionic 2 that uses various native plugins.
I want to be able to test the native features and observe the console logs but nothing gets logged, using either the ios emulator or an iPad device.
Ideally I also want livereload but I'll take what I can get.
I eventually got to display console logs in Xcode but that involves running
cordova platform prepare
then running the process from Xcode manually every time I make a single edit. This takes much longer than
ionic cordova run ios --target="iPad-Air" -c
Why can I not just see the logs when I use run?
I have looked at where it says the console.log file is saved to but no file gets created. I created the file myself and gave it full 777 permissions and still nothing.
ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.0.1
Cordova Platforms : browser 5.0.3 ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
ios-deploy : 1.9.2
Node : v8.8.0
npm : 5.4.2
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
To help anyone else who has trawled the forums and tried all the solutions where it seems everyone else can console.log except you, I will post what I have discovered. This is not a total solution but may identify the cause for some.
I was specifying the target as iPad-Air. When I didn't, the simulator started in iPhone-6. That is not what I wanted but there in my console was a very welcome console log message.
So I experimented a little and found that iPad-Air 10.0 and iPad-Air-2 10.0 and above will log to the console but 9.3 and lower (Not tested exhaustively) would not.
So for me, this solution will let me continue to develop with livereload and console logs and what's left of my hair.
Hopefully it will save someone else's hair loss too.
FYI you can set your chosen device as a project default in platforms/ios/cordova/lib/run.js in the deployToSim function. There should be a line like if (emulator.indexOf('iPhone') === 0) { swap out 'iPhone' (or whatever it is for you) and replace it with 'iPad-Air-2, 10.0' or whatever you need and have available in your simulator list. ios-sim showdevicetypes
Good luck!
Witout from option PostCSS could generate wrong source map or do not
find Browserslist config. Set it to CSS file path or to undefined to
prevent this warning
ionic3 project, when I running ionic corodva bulid ios --prod showing this warning for me.
ionic info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.1.7
Cordova Platforms : android 6.3.0 ios 4.4.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v6.11.3
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
UPDATE:
I tried to update my npm to 5.5.1 and node to 8.6.0, but still showing.
Finally, this warning solved. Thanks to Suraj Rao
First find sass.js file under /node_modules/#ionic/app-scripts/dist/sass.js.
inside search var postcssOptions and add from: undefined,
Finally should be like this:
var postcssOptions = {
from: undefined,
to: path_1.basename(sassConfig.outFile),
map: autoPrefixerMapOptions
};
Reference: workaround.
For whoever directly used PostCSS and met this issue then came here,
Change your
postcss( any_plugins ).process( css )
to
postcss( any_plugins ).process( css, { from: undefined } )
can fix the issue.
For me, adding map: { inline: false } solved my problem.
I'm trying to upload the App I built to my Ionic Pro account.
I've linked my account and added the SSH keys but after running ionic upload I'm getting this error
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
This is My Ionic Info
cli packages: (/home/jos/Desktop/helloapp/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : not installed globally
local packages:
Cordova Platforms : android 6.2.3 browser 4.1.0
Ionic Framework : ionic1 1.3.1
System:
Android SDK Tools : 26.0.2
Node : v6.11.0
npm : 3.10.10
OS : Linux 3.13
ionic upload doesn't work with backend pro, you have to create an app
on https://dashboard.ionicjs.com/apps and there will be a setup guide :)
Tried many times, the apk file size does not change.
ionic revert android;
ionic browser add crosswalk-lite
ionic build android
I also tried remove android platform and do from scratch, but never suceeded.
Your system information:
Cordova CLI: 5.0.0
Gulp version: CLI version 3.8.11
Gulp local: Local version 3.8.11
Ionic CLI Version: 1.4.4
Ionic App Lib Version: 0.0.20
OS: Distributor ID: Ubuntu Description: Ubuntu 12.04.5 LTS
Node Version: v0.12.3
Same here.
I guess crosswalk-lite is so new that ionic still doesn't quite cope with it. Or it did, but things have changed now.
When I run:
ionic browser remove crosswalk
ionic browser remove crosswalk-lite
ionic browser add crosswalk-lite
I get this ionic.projectfile:
{
"name": "chapter5",
"app_id": "27fa0870",
"browsers": [
{
"platform": "android",
"browser": "crosswalk-lite",
"version": "12.41.296.5"
}
]
}
ionic info output:
Cordova CLI: 4.2.0
Gulp version: CLI version 3.8.11
Gulp local:
Ionic Version: 1.0.0-rc.0
Ionic CLI Version: 1.4.5
Ionic App Lib Version: 0.0.22
OS: Distributor ID: Fedora Description: Fedora release 21
(Twenty One)
Node Version: v0.10.36
Also, take notice of your cordova-android version, when you run browser add:
Android project created with cordova-android#4.0.0-dev
And your cordova-crosswalk-engine. Mine says: c0.7.1
Those are all inter-related and may lead to weird errors.