[ERROR] ng has unexpectedly closed (exit code 1).
I have found the best way to escape an error like this one is just to run
npm install npm update
then run
ionic cordova prepare android
I have found the best way to escape an error like this one is just to run
npm install npm update
then run
ionic cordova prepare android
WP URL for the endpoints contain the prefix as well as a namespace. Here is an example endpoint
That will fetch the details of all posts. The above example, “wp-json” is the rest url prefix while the “wp/v2” is the namespace.
If you don’t like the default base prefix and want to change it from ‘wp-json’ to something more beautiful, the code below will help you. In the code below, I have changed the base prefix from ‘wp-json’ to ‘api’.
/** * Modify url base from wp-json to 'api' */ add_filter( 'rest_url_prefix', 'dp_api_slug'); function dp_api_slug( $slug ) { return 'api'; }
you can change the return ‘api’; to return ‘any-custom-prefix’;.
Once you put the above code in your theme’s functions.php or in a plugin, Please visit the Dashboard->Settings->Change your permalinks( You can restore it after saving again, we need to change it at least once to flush the rewrite rules ).
So your URL example will look like the following:
Start by adding the following to your package.json file
"resolutions": { "@babel/preset-env": "7.5.5" },
next, you will run these two commands
npx npm-force-resolutions npm install
now you can run your build method like ionic Cordova build, ionic build and etc.
the second way to fix this error is just running the following
npm install --save-dev @babel/plugin-proposal-numeric-separator