My app was running fine and now it is showing me an error which i tried to figure out until now.
ERROR in ../node_modules/nativescript-permissions/permissions.js
Module not found: Error: Can't resolve '#master.technology/permissions' in '/Users/abdull/Desktop/my-app/node_modules/nativescript-permissions'
# ../node_modules/nativescript-permissions/permissions.js 13:17-58
# ../node_modules/#nativescript/imagepicker/index.js
# ./app/shared/image-helper.ts
# ./app/app.module.ts
# ./main.ts
After searching i figured out that i have a plugin "#nativescript/imagepicker": "^1.0.5" which requires "nativescript-permissions": "~1.3.0" in package-lock.json
Migrating from NativeScript 7 to NativeScript 8 fixed the issue for me. To migrate see the link https://v6.docs.nativescript.org/angular/releases/upgrade-instructions
$ tns migrate
After migration, when running the app it might say thar zone.js not found. For that the fix is available at:
https://github.com/manfredsteyer/ngx-build-plus/issues/4
Add
import 'zone.js' in main.ts
Related
Thanks in advance
I received the below error when I tried to upgrade react native from 68.1 to 70.6.
I tried this in android.
I ran react-native run-android and everything went well.
Upon running the app the metro bundler started loading 99% and showed this error in red screen
error: node_modules/react-native-svg/src/elements/Shape.tsx: /Users/jarenk/Documents/myApp/node_modules/react-native-svg/src/elements/Shape.tsx: child.isClassAccessorProperty is not a function
Can anybody help me on this.
Am using react native SVG and its version was old. I updated it to latest version too.
(13.6.0) but still its getting same error.
Error In Detail (If I take Build)
./gradlew assembleRelease
I get following error
error node_modules/react-native-svg/src/elements/Shape.tsx: /Users/jarenk/Documents/myApp/node_modules/react-native-svg/src/elements/Shape.tsx: child.isClassAccessorProperty is not a function.
TypeError: /Users/jarenk/Documents/myApp/node_modules/react-native-svg/src/elements/Shape.tsx: child.isClassAccessorProperty is not a function
at /Users/jarenk/Documents/myApp/node_modules/#babel/plugin-transform-typescript/lib/index.js:361:89
at Array.forEach (<anonymous>)
at PluginPass.Class (/Users/jarenk/Documents/myApp/node_modules/#babel/plugin-transform-typescript/lib/index.js:353:31)
at newFn (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/visitors.js:171:21)
at NodePath._call (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/path/context.js:90:31)
at TraversalContext.visitQueue (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/context.js:110:16)
at TraversalContext.visitQueue (/Users/jarenk/Documents/myApp/node_modules/#babel/traverse/lib/context.js:116:21)
info Run CLI with --verbose flag for more details.
Once again thank you.
Updating the package.json file helped me to resolve this.
just downgrade the babel versions like below
Also make sure same below version are in package-lock.json file
"#babel/core": "7.12.9",
"#babel/runtime": "7.12.5"
To solve this issue, you need to delete the "node_modules" folder and run either
"yarn install" or
"npm install" command.
It is likely that you switched to a Git branch with a higher version of Babel, which is causing the problem.
I've been trying to run my react native application, but it crashed when started and the debugger didn't return any error, so I checked the log cat in Android Studio and it shows me the following error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom / google / firebase / iid / FirebaseInstanceId;
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId"
The React-Native version that I am using is: 0.61.5
And the version of react-native-firebase that I have installed is 5.6.0
It has already been a recent failure, since previously the app worked correctly and I have not made any changes to the firebase integration either
To debug this, first I would suggest running adb logcat and seeing what Java error you are getting. If it errors out on the not being able to find the required Java classes, then try adding the following to your project:
app/build.gradle file (dependencies section):
implementation 'com.google.firebase:firebase-iid'
(You might need to provide a version for this package as well)
I have getting same error, I fixed this error by uninstalling old version and installing new version of push notification.
uninstall:
npm uninstall react-native-push-notification
install:
npm i react-native-push-notification
since react-native-push-notification upgraded to new version v7.x so that, while installing app it give above error.
checkout this -> https://www.npmjs.com/package/react-native-push-notification
There is an issue, in react-native-push-notification (FirebaseInstanceId has been deprecated and now removed). Sounds like you are using a lib that is using that that here. It should be fixed later on, but for now you can add the following to your android/build.gradel file.
buildscript {
ext {
...
firebaseMessagingVersion = "21.0.0"
}
I had also to update these libs (you will get compile errors if you don't, so you may have others to update):
- "react-native-device-info": "^5.5.8",
+ "react-native-device-info": "^8.1.3",
- "react-native-push-notification": "^7.3.0",
+ "react-native-push-notification": "^7.3.1",
This is in reference to this issue
wix/react-native-notifications
This lib having issue with refreshToken() Method.
Didn't find class "com.google.firebase.iid.FirebaseInstanceId"
so just remove / reinstall the package, if still error is coming then we have to wait for next bug fix release of this lib or
we can manually change native code to make it working.
below is link of lib
https://github.com/wix/react-native-notifications/issues?q=FirebaseInstanceId
I'm trying to build my ionic app for android and most users have a white screen after the splashscreen. I've past the past week to try to determine where it could come but got no idea... So I'm trying to get rid of all the errors I have when building. (it still succed to build with the errors and worked on almost half phones).
First one is here :
Building for Android...
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin remove sentry-cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
> cordova.cmd plugin remove sentry-cordova Sentry: running before_plugin_rm - set SENTRY_SKIP_WIZARD=true to skip this angular.json build.json build_android.sh build-extras.gradle CertificateSigningRequest.certSigningRequest
...
tslint.json www Uninstalling sentry-cordova from android Subproject Path: CordovaLib Subproject Path: app Uninstalling sentry-cordova from browser js-module uninstall called : plugins\sentry-cordova\dist\js\sentry-cordova.bundle.js Uninstalling sentry-cordova from ios Removing "sentry-cordova" Removing sentry-cordova from package.json doc.find is not a function
Second one is after, there is multiples lines like this :
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1-es5.1922
I'm pretty sure I miss some informations. Don't hesitate to ask if necessary but I'm sure I forget to do something, but i'm kinda desperate now...
EDIT : Here is the begining of the script I'm using for build :
echo "Building for Android..."
#npm run android:build:prod
sentryRemove=$(ionic cordova plugin remove sentry-cordova)
echo $sentryRemove
sentryAdd=$(cordova plugin add sentry-cordova)
echo $sentryAdd
echo "successfully added the sentry. \n Performing build now."
appBuildOut=$(ionic cordova build android --prod --release --source-map)
echo $appBuildOut
BUILD_MESSAGE='BUILD SUCCESSFUL'
Thanks for your help
The first question is why are you running a plugin remove command when building your app, if I understand correctly. I would check what is calling this command because the script that is erroring before_plugin_rm should only be called when the plugin is being removed.
To get this script to just work, try running with the environment variable SENTRY_SKIP_WIZARD=true and see if the build works. I don't think the reason for the white screen is related to Sentry as the step that is failing looks to be related to source map uploading.
I figured i would try the 'new' CLI tool for Ionic, Package, but i am getting some weird errors that i haven't seen before.
When running the command :
ionic package build android --profile release
The error i am getting
undefined:0
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:179:28
at fs.js:271:14
at Object.oncomplete (fs.js:107:15)
After some research i found that this can happen when a command is run without sudo, but when running the command with sudo i am getting the dam error message.
Hopefully i am lucky and ill find an Ionic enthusiast who might help me with the matter. Couldn't find any Ionic related topics where this error was mentioned.
Any help appreciated!
I had to add [] to the .io-config.json file in the root directory of my ionic app.
Btw. dont forget to install ionic add ionic-platform-web-client
The solution for me was annoyingly simple. In the file mentioned, find the line where CONFIG_BACKUP is defined and change it. You should see that it is:
var CONFIG_BACKUP = './.io-config.json'
It should actually be:
var CONFIG_BACKUP = './io-config.json'
I was building for iOS but had the same error as you which disappeared after the above.
For me the error resulted from the config.xml file. I would open all ionic files to make sure there are no formatting errors. The rebuild
I am trying to build my phonegap app locally and am incountering the following error
[phonegap] adding the Android platform...
Error: Invalid attribute name Line: 0 Column: 36 Char: ?
at error (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8)
at strictFail (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:364:22)
at Object.write (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:876:16)
at XMLParser.feed (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:263:10)
at Object.exports.XML (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:593:13)
at Object.module.exports.parseElementtreeSync (/usr/lib/node_modules/phonegap/node_modules/cordova/src/xml-helpers.js:111:38)
at Object.config_parser (/usr/lib/node_modules/phonegap/node_modules/cordova/src/config_parser.js:25:20)
at Object.platform (/usr/lib/node_modules/phonegap/node_modules/cordova/src/platform.js:65:15)
at LocalBuildCommand.module.exports.addPlatform (/usr/lib/node_modules/phonegap/lib/phonegap/local.build.js:153:13)
I am using phonegap 3.0.0
I might be a little late but I just had this problem and solved it.
I just deleted the android folder in 'platforms' and reran
phonegap run android
you can also do phonegap add android if you don't want to run it.
Make sure to back up your xml manifests if you made any changes.
The right way is:
1) $ phonegap platform rm android
2) $ phonegap plaftorm add android
3) $ phonegap build android
It is also recommended to do this when you add or remove plugin.