Unable to add android platform in ionic - ionic-framework

Hello whenever I run the following command
ionic cordova platform add android
It results to following error:
(node:304) UnhandledPromiseRejectionWarning: CordovaError: No platforms added to this project. Please use `cordova platform add <platform>`.
at Object.preProcessOptions (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\util.js:312:15)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\run.js:30:32
at _fulfilled (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:810:14
at flush (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
(node:304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting
a promise which was not handled with .catch(). (rejection id: 1)
(node:304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a
non-zero exit code.

Try this command:
cordova platform add android

Related

Can not connect to MongoDB Atlas version 4.0

I can't connect to the last version of Atlas (4.0), but if using an older version it connects!
I got this message when trying to connect to version 4.0
(node:9920) UnhandledPromiseRejectionWarning: Error: queryTxt ETIMEOUT cluster0.zgdl9.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9920) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9920) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Go the the Network Access on your Atlas Cluster and check if you whitelisted your IP. You can also whitelist all IPs with 0.0.0.0/0. I think by default no IP is whitelisted and that is why you can't connect.

Strapi Start Install Issue on Mac

Having an issue installing Strapi on my Mac. Not sure what is going on really. Tried running npm install strapi-hook-strapi-mongoose and ran into 404 Not Found: strapi-hook-strapi-mongoose#latest.
USERs-MacBook-Pro:DIRECTORY USER$ strapi start
[2018-08-08T04:22:21.087Z] warn (hook:strapi-mongoose) `strapi-hook-strapi-mongoose` is missing in your dependencies. Please run `npm install strapi-hook-strapi-mongoose`
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/settings-manager/config/functions/bootstrap.js:17:26)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:42355) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/users-permissions/config/functions/bootstrap.js:77:45)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/email/config/functions/bootstrap.js:53:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/upload/config/functions/bootstrap.js:55:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
[2018-08-08T04:22:25.197Z] info File changed: /Users/USER/Documents/GitHub/DIRECTORY/plugins/graphql/config/generated/schema.graphql
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
Installation
npm install strapi#alpha -g
Installation Guide
For Strapi installation Guide, Click here
Turns out this is a common Mac bug, instead of using the 'strapi' command where I too got that error, I created my project using yarn and I was able to get past it.
yarn create strapi-app new-project-name

Ionic: how to fix UnhandledPromiseRejectionWarning?

when i trying to bulid in ionic app, that shows an error
Preparing Firebase on Android
(node:11588) UnhandledPromiseRejectionWarning: Unhandled promise rejection (reje
ction id: 1): [object Object]
(node:11588) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr
ecated. In the future, promise rejections that are not handled will terminate th
e Node.js process with a non-zero exit code.

Failed to install 'cordova-plugin-file' - Ionic-cordova

I was trying to install the plugin
ionic cordova plugin add cordova-plugin-file
I'm getting error in cmd as
Failed to install 'cordova-plugin-file': Error: ENOENT: no such file
or director y, open
'D:\product\project-1\frontend\platforms\android\AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:\product\project-1\frontend\platforms\andr
oid\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (D:\product\project-1\frontend\platforms\android\cord
ova\lib\AndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:\product\project-1\frontend\platforms\an
droid\cordova\lib\AndroidProject.js:99:12)
at Api.addPlugin (D:\product\project-1\frontend\platforms\android\cordova\Ap
i.js:223:57)
at handleInstall (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_
modules\cordova-lib\src\plugman\install.js:594:10)
at C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova
-lib\src\plugman\install.js:357:28
at _fulfilled (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_mod
ules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\hi\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
(node:5240) UnhandledPromiseRejectionWarning: Error: ENOENT: no such
file or dir ectory, open
'D:\product\project-1\frontend\platforms\android\AndroidManifest.xm l'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:\product\project-1\frontend\platforms\andr
oid\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (D:\product\project-1\frontend\platforms\android\cord
ova\lib\AndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:\product\project-1\frontend\platforms\an
droid\cordova\lib\AndroidProject.js:99:12)
at Api.addPlugin (D:\product\project-1\frontend\platforms\android\cordova\Ap
i.js:223:57)
at handleInstall (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_
modules\cordova-lib\src\plugman\install.js:594:10)
at C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova
-lib\src\plugman\install.js:357:28
at _fulfilled (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_mod
ules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\hi\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
(node:5240) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 1) (node:5240) [DEP0018]
DeprecationWarning: Unhandled promise rejections are depre cated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
ionic cordova rm platform android
Then install the plugin. Then add the platform back.

Ionic 2: UnhandledPromiseRejectionWarning: Error: The platform "andorid" does not appear to have been added to this project

Got the following error while running the porject:
(node:5692) UnhandledPromiseRejectionWarning: Error: The platform "andorid" does not appear to have been added to this project.
at Object.getPlatformApi (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\platforms\platforms.js:46:15)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:54:38
at Array.map (<anonymous>)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:52:47
at _fulfilled (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
(node:5692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
It looks like you have a typo in the platform: "andorid" instead of "android"
Have you checked the command that you use to build?