Ionic 5 when im trying to take cordova android build this error is displaying? - ionic5

I'm getting the following errors:
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-android#0.0.8
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\FSTECH-17\AppData\Roaming\npm-cache\_logs\2020-07-20T06_20_28_398Z-debug.log
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add android --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

I suppose your version doesn't exist. I'm using cordova-android at version "8.1.0".

Related

Reactnative Fusionchart fc-build-assets shows an error

When I run npm run build:assets it output below error:
sh: fc-build-assets: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
My Package.json is configured as below:
"build:assets": "fc-build-assets --fc-template ./assets/fusioncharts-tpl-ios.html --fc-library ./assets/fusioncharts"
Note. I'm working on a version upgrade of react-native-fusioncharts from 4.1.2 to 5.0.0. Since I couldn't find proper upgrade guide, I follow this one.
https://www.fusioncharts.com/dev/getting-started/react-native/your-first-chart-using-react-native
Edit: fc-build-assets is no longer required in react-native-fusioncharts: 5.0.0 so if you are upgrade it no need to worry about it.

React Native Setup

I am new to react native and I am trying to set it up using the tutorial from this youtube video:https://www.youtube.com/watch?v=0-S5a0eXPoc&t=811s
However, I am getting errors whenever I try to run the program.
When I run it using expo start I get this error:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
And when I run it using npm start, i get this:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried some solutions from here: error: This is probably not a problem with npm. There is likely additional logging output above
But they did not work.

React app deployment failure on heroku "Failed to minify the code from this file"

I created a react app using the create-react-app command and tried to deploy it on heroku using the directions on https://github.com/mars/create-react-app-buildpack#quick-start
However while trying to push to heroku, I come up with the following Build Fail in which the build log reads:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/newsapi/index.js:17
Read more here:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sports-news-app#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sports-news-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2018-08-15T03_41_33_617Z-debug.log
! Push rejected, failed to compile React.js (create-react-app) multi app.
! Push failed
newsapi/index.js at line 17 reads
let API_KEY; // To be set by clients
It's hard to say what the error could be without seeing newsapi/index.js. It is possible that the file includes syntax that is not supported or fails to be minified. One solution is to see if that line is an import, and create a local version of that dependency with the offending syntax removed or updated.

create-react-app npm run build fail to minify watson node sdk

I am new to React and I am trying to build a react app using create-react-app and Watson node-sdk. Everything works fine in development mode after running npm start. But when I try to build a production package using npm run build and below is the error I receive.
e:\Microsoft\Workspace\React\myapp>npm run build
> myapp#0.1.0 build e:\Microsoft\Workspace\React\myapp
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/watson-developer-cloud/lib/helper.js:31
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yk\AppData\Roaming\npm-cache\_logs\2017-09-
20T09_40_36_144Z-debug.log
The line that giving error is let missing; and seems like the let is causing the issue. Is there anything I can do with this?
Encountered this problem today. the doc suggests some solutions:
Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your src/ folder and treat it as application code.
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

Error while adding Android platform to Ionic v3.9.2

I am using Ionic version 3.9.2 with node 5.3.0. I tried to add android platform to my app, but it showing an error as follows:
Running command - failed!
ERROR] Exception: Using cordova-fetch for cordova-android#~6.2.2
Error: Failed to fetch platform cordova-android#~6.2.2
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat
'D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, lstat
'D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, lstat
\'D:\\Ionic\\SimBing\\node_modules\\fsevents\\node_modules\\getpass\\node_modules\'\n at
Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path:
'D:\\Ionic\\SimBing\\node_modules\\fsevents\\node_modules\\getpass\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\eficaz2020\AppData\Roaming\npm-cache\_logs\2017-09-12T11_09_42_574Z-debug.log
If you are using Windows, you should open windows environment variables and add to path C:\Windows\System32 in system variables, then close and reopen your cmd and try again. Also, be sure to run your commands as administrator.
Check for the version of android provided by cordova under C:/Users/%USER%/.cordova/lib/npm-cache/cordova-android (if you are using Windows) and install the respective android platform version.
If all of this doesn't work do the following :
1- remove android platform
2- add the specific version of android that is giving you the error
cordova platform add android#6.2.2
3- also you can try the command below based on a similar issue
cordova platform add android --nofetch

Resources