I am attempting to connect my Ionic mobile app to AWS backend and keep getting the same error.
Cannot find module "../aws-exports"
I've checked the node-modules folder and this is missing, but I have no idea what I should put here to fix this error.
The same code is in a lot of files in this app.
const aws_exports = require('../aws-exports').default;
I'm not sure what this code does exactly. If anyone has an experience with Ionic that could help that would be great.
Thanks,
Matthew.
You need to follow the steps in the README. Specifically, the section on Creating AWS Mobile Hub Project. When you init the AWSMobile project, aws-imports is created for you.
P.S. aws-amplify has introduced some changes in the last couple of weeks that cause the ionic starter to not work. Follow these steps to fix the errors.
If you sign into your Amazon console and you go to your Mobile Hub.
https://console.aws.amazon.com/mobilehub/home#/
You can click on your project and it will return the ID in the URL as follows:
https://console.aws.amazon.com/mobilehub/home#/YOUR_ID_HERE/build
You can then run the following command:
awsmobile init <mobile-hub-project-id>
The AWS Mobile Hub scripts should then fetch all relative dependencies and make the appropriate installations to rectify the issue.
Related
I am facing one problem when I am host my project to aws amplify. I successfully build a demo ecommerce project. I deploy this next js project to aws amplify. I use next/image component on my project. When I enter my site, I can see some images(Not all image) are not loaded properly. They show alt text instead. You can see this gif for understanding.
-https://media.giphy.com/media/bOekkFQdH2OVcoumwj/giphy.gif
You can see live url also- https://www.nekmart.com/
Please see the gif for understanding actual problem.
Here I host my image to aws S3. I use cloudfront also. For debugging my problem. I also deploy my project to vercel and netlify. From vercel and netlify I am not getting any kind image not loading issue.Here is those links-
Vercel link- https://nekmart-k71c.vercel.app/
Netlify link- https://remarkable-licorice-795c08.netlify.app/
But I have to use aws. Now How can I debug my problem? I can't understand actually where is the problem occured-
next/image component problem- I use it in this way- <Image src={process.env.NEXT_PUBLIC_IMAGE_PATH + brand.image} width={25} height={25} alt={brand.name} />
Need to setting up aws amplify properly?
Need to setting up aws s3 properly?
Need to setting up next config for image component.
I am confused, Which one? Please help me to debugging this problem.
I have deployed a Django app to Azure through Github actions to Azure app service. But it gives a Server error 500 everytime. I have configured the static files and react template properly. In the Diagnose tab there's no error is displaying. How can I troubleshoot and find the error or Is there any other things to configure in Azure? I hosted a same copy in Heroku and it works there.
Make sure you are using the below steps:
SCM_DO_BUILD_DURING_DEPLOYMENT=true – With this setting set to true - Kudu will execute build steps on your site during deployment.
DEBUG = 0 - please check (if this can make any change) after adding this config to your configuration.
You need to enable the Detailed error pages in your portal. This may give a detailed log to know why it happened.
Try Adding Application Insights to your App to check the detailed logs
Best practices to deploy your Application
Refer here Link 1 & Link 2
I’m using expo sdk 42.0.0
The relevant platform is android
I’m using expo managed workflow, and right now I’m trying to implement IAP (In App Purchases). I saw that google play won’t let me add In App Product because I don’t have the BILLING permission in my apk/aab.
What I already did:
I’ve installed expo-in-app-purchases because I though it would make expo add the BILLING permission automatically.
I tried added to the app.json file the following line: "permissions": ["com.android.vending.BILLING"]
I also notice that when I add other permissions, it does not work. Maybe there is a problem with expo app.json permission in android.
Nothing worked. What can I do more to add the BILLING permission to my app?
Expo announced that it's their bug and how to workaround it. The link
To implement IAP u need one special package, u can find the tutorial here in the doc:
https://docs.expo.dev/versions/latest/sdk/in-app-purchases/
I'm trying to make an SPA in React with AWS.
While I was going through the basic steps here (Step 3 ADD AUTHENTICATION ) :
I deployed the changes to the live environment, but the build failed.
I'm getting this error.
Can anyone please explain to me what caused this error?
This seems to be a known issue in the Amplify GitHub and can happen when the Amplify CLI version used by the Amplify Console is mismatched with the version you are using locally. Here is some more information: https://github.com/aws-amplify/amplify-cli/issues/6117#issuecomment-794176834
Compare your Amplify App -> Build Settings -> Build image settings -> Amplify CLI version with your version installed on your development machine by running amplify --version
Other than checking for version matching, I also have found out if amplify backend doesn't have a role attached to it, the built process is going to fail. to do that you follow the link bellow directions: https://docs.aws.amazon.com/amplify/latest/userguide/how-to-service-role-amplify-console.html
However, before that, go to the General tab under App settings to see if the role is empty or not. You might already have a role, if not follow that link.
I have installed aws plugins from http://aws.amazon.com/eclipse.
While creating aws java project, next and finish buttons are not enabling.
While opening eclipse, I am getting below errors.
Couldn't read regions file,
Failed to cache regions file,
Unable to check status of AWS SDK for Java download and Unable to refresh security groups: Unable to execute HTTP request: peer not authenticated.
The problem is,your AWS SDK is not installed and updated properly . Just click on >Help in eclipse and then click on >Installation Details and from that reinstall AWS Eclipse plugin .
Please make sure that url of plugin is appropriated for your eclipse version.
It will solve your problem.
Try using a new workspace and you will be good to go.
Let know if the problem still persists.