Error when I try to run an app in android Ionic 4 - ionic4

I have this error when I try to run my app in android
An unhandled exception occurred: [BABEL] C:\Users\UserName\Desktop\Ionic\MyProject\www\32-es2015.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\Users\UserName\Desktop\Ionic\MyProject\node_modules\#babel\preset-env\lib\index.js")
See "C:\Users\UserN~1\AppData\Local\Temp\ng-GJZvQx\angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.

as mentioned in this workaround
delete node_modules and package-lock.json
add "resolutions": { "#babel/preset-env": "^7.8.7" } to package.json
npm install npm-force-resolutions --save-dev
npm install
npx npm-force-resolutions
npm install again
run or build your app
if the error persist in future builds of your app try from step 5 before build it.

open package.json
"dependencies": {
"#babel/compat-data": "7.8.0"
}
run command
npm install
and then build your project and it should work.

Related

Error when trying to do 'expo build:android'

In the Terminal I get the following error after running the expo build:android command:
Error: Can't find react-native in package.json dependencies
Error: react-native is not installed. Please run `npm install` or `yarn` in your project directory.
There is an error with your project. See above logs for information.Error: There is an error with your project. See above logs for information.
Terminal error picture
I have already tried to update npm version, npm install, and I also tried npm install -g eas-cli
Are there certain steps anyone thinks I should do?
Follow below guide
Delete node_modules folder in root folder
npm install (If you are using yarn use yarn install)

react-native android won't run on device

i just started a project and im trying to start the but it already has this error showing:
error: node_modules\react-native\Libraries\Image\ImageAnalyticsTagContext.js: Property body[6] of BlockStatement expected node to be of a type ["Statement"] but instead got "AssignmentExpression"
this is a known issue caused by a bug in a newly released version of babel. it will impact all new react-native and expo apps. you can resolve it with yarn resolutions in a new project:
--- a/package.json
+++ b/package.json
## -25,5 +25,8 ##
},
"jest": {
"preset": "react-native"
+ },
+ "resolutions": {
+ "#babel/plugin-transform-react-display-name": "7.14.5"
}
}
After insert resulutions key on the package.json, run yarn install
Credits: https://github.com/brentvatne
Issue Link: https://github.com/facebook/react-native/issues/31961
Run this command:
npm install --save-dev #babel/plugin-transform-react-display-name
The problem is due to a babel update that affected the RN project. copy #babel from some other project and paste in node_modules or Download the #babel folder from here and replace the existing folder in the node_modules.#Babel Download
And run
npm start --reset-cache

When install the "#sencha/ext-web-components" in vue application this error occour?

I'm adding this "#sencha/ext-web-components" package in to package.json and run npm install. This error occour?

Error: Module `#nuxtjs/vuetify` not found. (v2.0.0-beta.2)

Because of fibers error on cPanel/CentOS/Cloudlinux servers, I'm using v2.0.0-beta.2 of #nuxtjs/vuetify in my Nuxt app.
But npm returns error on build or dev running.
No problem with v1.11.2, but the alpha and beta versions have error.
✖ Nuxt Fatal Error
Error: Module `#nuxtjs/vuetify` not found. Please ensure `#nuxtjs/vuetify` is in `devDependencies` and
installed. HINT: During build step, for npm/yarn, `NODE_ENV=production` or `--production` should NOT be
used.
package.json
"devDependencies": {
"#nuxtjs/vuetify": "^2.0.0-beta.2"
}
nuxt.config.js
buildModules: [
'#nuxtjs/vuetify'
]
I deleted the node_modules folder and re-runned the npm install and problem solved.
Go through the bellow commands
Delete node_modules
run npm i if you have previously npm installed on you machine otherwise run npm install then run npm i .
run npm run build
run npm run start
I tried Fred solution but didn't work out for me.
However I run this command npm install #nuxtjs/vuetify -D to install the vuetify component and the problem solved.

Errors when trying to run react-native on ios

so I developed an app in react-native, already runs and tested on Android, but now its the ios part.
I'm working with react native version 0.60.3, on MacOS, using yarn as package manager.
I'm running "react-native start --reset cache".
then running "react-native run-ios:" on a separate console,
and getting this error:
"
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening app.xcworkspace.
....
error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference(...))
"
so then im trying to run with Xcode and i get this error on the "react-native start --reset-cache" console:
"
Error: Unable to resolve module ./index from /Users/nono/work/myapp/.: The module ./index could not be found from /Users/nono/work/myapp/.. Indeed, none of these files exist:
* /Users/nono/work/app/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
"
and this error on the iphone simulator :
I'm desperate ... please help!
UPDATE:
now the first error doesn’t occur.
I only get the "Unable to resolve './index' ... "
error
Try to run the following commands on terminal:
npm install
cd ios; pod install; cd../
react-native link
try this:
Stop the MetroBundler/launchPackager
Delete node_modules
rm -rf node_modules
Change the version on your package.json
from
"react-native": "0.59.1",
to
"react-native": "0.58.6",
Then clean the watchman
watchman watch-del-all
Run npm install again:
npm install
And try to run your project, in my case:
react-native run-ios
My bad. I accidentally deleted the index.js ..