React JS App becomes blank white screen when deployed with AWS Amplify - javascript

I have a React JS app that works on local host, but when I deploy to AWS amplify displays as a blank white screen with no body. The browser tab shows the correct title and icon.
The page returns status code 403 and I believe there is a CORS issue? I have been unable to correct this in my code or on the Amplify console. Can someone point me towards what is causing my problem? I have successfully deployed a different React app with Amplify.

In my case I needed to change the homepage url in the package.json to match my Amplify URL. To do this add, or modify, the following line in your package.json:
"homepage": "{Amplify-URL}/#/"
The Amplify URL can be found in the Amplify console under App settings -> Domain Management -> URL.
Hopefully this helps!

In the build settings i.e. the amplify.yml file, you need to specify under artifacts the base directory which webpack or the build tool being used will generate.In my case this is the dist directory, because due to running yarn build command.
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: dist

Related

Electron-builder uses wrong filename in https request when trying to fetch the latest release

I am building an application in electron and currently I'm trying to implement electron-builders autoUpdate. I have one private repository with my source code and one public repository where I want to release the updated artifacts of my app.
The process looks like the folliwing:
Install v1 of app on computer
Build v2 of app
Publish v2 of app on github
Open v1 of app on computer -> starts downloading newer version
My application is able to recognise that there is a new release published on github but when it tries to download it generates the wrong url. I get the following error message
error Cannot download "https://github.com/user/repo/releases/download/v2/application-1-universal-mac.zip", status 404:
To me the problem seems to be that in the request the wrong version number is being used. It uses the artifact name "application-1-universal-mac.zip" instead of "application-2-universal-mac.zip" which is uploaded.
In package.json I have tried to change:
"build": {
"artifactName": "appName.${ext}",
"executableName": "lol",
"buildVersion": "400",
"productName": "app",
}
which changes the name of the file but in the request it always uses the default
"node-app-${version}.${ext}"
Does anyone have a clue which variable electron-builder is looking at when generating file name in the request?

Electron vue app - using private repo to update app

I'm trying to use electron auto updater feature in my app. The publishing process works fine, I've configured my vue.config.js file correctly and inside a .env file I have my token stored. The problem is whith the bundled app, it will not open and will show a blank screen because to check for update it need the github token. I don't want to ship the token with the app source code and I don't have idea of how to solve this problem. Can anyone suggest me a reilable solution? I've read this old github issue but my vue electron app stop working if I obfuscate the code.

Surge is not deploying my site

I used create-react-app to make a simple playlist creator with Spotify's API. I updated my redirectUri to the surge domain: http://jamming-1990.surge.sh/ and updated it on the dashboard of my app on Spotify's site as well.
I ran npm run build and followed the steps from the command surge, I get the output that it was created successfully but when I go to the domain, http://jamming-1990.surge.sh/ I get a 404.
Not sure what steps I missed, or why it's not deploying.
When inputting the path you must make sure to be in the build folder instead of the main root!

Sideloading app with ngrok not working

Repro steps...
I created a Teams tab app via the teams yeoman generator (installed via npm).
I followed the locally hosted option that uses ngrok.
I started ngrok with ./ngrok http 3007 --host-header=localhost:3007 (still running) and copy/pasted the generated urls into my manifest.json
I started another terminal session and ran gulp serve
I created my package via gulp manifest
I tried to sideload the generated zip and get the error messages: Error while reading manifest.json: Failed to find icon "https://xxxxxxxx.ngrok.io/assets/tab-44.png" file in the package Failed to find icon "https://xxxxxxxx.ngrok.io/assets/tab-88.png" file in the package
(subdomain redacted)
This is what I've confirmed/debugged...
Going to https://xxxxxxxx.ngrok.io/assets/tab-44.png and https://xxxxxxxx.ngrok.io/assets/tab-88.png works fine in the browser. I see the default smiley face icon and see the request in the ngrok terminal and web interfaces.
I don't see any requests coming from Teams attempting to fetch the icons in the ngrok interfaces.
I've also tested that I can reach the icons from my phone.
I've unzipped the generated package and it only contains the manifest.json with the correct ngrok urls.
My tenant has enabled sideloading of apps.
I am an owner of the Team I'm trying to sideload this app into.
Any ideas? Thank you!
The outline and colour are relative file paths to PNG icons. Please put both the icons (tab-44.png & tab-88.png) as part of package along with manifest.json file.

How to set a file path or a symlink path for rocketchat(meteor) app running in ubuntu

I am new to node.js, meteor. I am working with analyzing an app (Rocket Chat) which was build using meteor. I am trying to setup rocket chat app demo with localhost.
So I just download app source code from "https://github.com/RocketChat/Rocket.Chat" and run with meteor. It shows errors " Evacuation Allocation failed - process out of memory" and "Builder can not write without either data or a file path or a symlink path".
I have searched for solution for this issues, I got some reference, as I need to set some "Environment variable" for app. But not clear about what value needs to set in environment variable.Hereby I attached the screenshot of error, I have received. http://postimg.org/image/4dda23c59/
How can I set environment variable, How to fix those issues? Anyone can help me!
Thanks in Advance!.

Categories

Resources