Why react-snap push fails to Heroku? - reactjs

I went through setup of react-snap, but when pushing to Heroku it fails.
https://www.npmjs.com/package/react-snap
Do you have any idea why?
remote: Error: Failed to launch chrome!
remote: /tmp/build_7dd913c10a184386f4680b1463b79feb/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
I added the buildpacks required:

Related

React Native Android duplicate resources when building with asembleRelease

"react-native": "0.68.2"
Hi everybody, I'm trying to get .aab file for my react native app but when I use command:
gradlew assembleRelease
I get the following error:
Task :app:mergeReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> [drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-hdpi\node_modules_reactnavigation_elements_src_assets_backicon.png [drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-hdpi\node_modules_reactnavigation_elements_src_assets_backicon.png: Error: Duplicate resources
[drawable-mdpi-v4/assets_images_amaro1] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-mdpi\assets_images_amaro1.jpeg [drawable-mdpi-v4/assets_images_amaro1] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-mdpi\assets_images_amaro1.jpeg: Error: Duplicate resources
[drawable-mdpi-v4/assets_images_applogo] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-mdpi\assets_images_applogo.png [drawable-mdpi-v4/assets_images_applogo] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-mdpi\assets_images_applogo.png: Error: Duplicate resources
while creating debug apk, compiler creates drawable images, which we need to delele while creating release apk
delete these files path android/app/src/main/src
path drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon
path drawable-mdpi-v4/assets_images_amaro1
path drawable-mdpi-v4/assets_images_applogo
then
gradlew assembleRelease

Suddenly facing this issue. Previously it was working fine

BUILD FAILED in 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'Peace Garden'.
Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':classpath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :
> No matching variant of com.facebook.react:react-native:0.71.0-rc.0 was found. The consumer was configured
to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally,
as well as attribute 'org.gradle.plugin.api-version' with value '7.3.3'

Github deploying issues

When I try to use npm run deploy on github, it throws me the following errors:
fatal: bad object refs/remotes/origin/main
error: github.com:Aris-Empanta/Accountant_landing_page.git did not send all necessary objects
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: bad ref for .git/logs/refs/remotes/origin/main
fatal: bad object refs/remotes/origin/main
fatal: failed to run repack
error: task 'gc' failed
Any suggestions?
Though VS code command line, everytime I change my project I push the changes you know, git add, git commit, git push origin. After that when I confirm the merging from github, I write npm run deploy to deploy the changed project to gh-pages. It was working, but suddenly stopped.

Netlify/ git LFS exit status 128

So on my netlify website, I'm trying to upload a video thats over 300mb(12 minutes long) and have it posted to the page. I had to use Git LFS to push my mp4 file to github. Now when I go to deplot my site I get the exit status 128 and its saying this in my deploy log
4:54:27 PM: Error checking out branch: Downloading public/Videos/PythonCalc.mp4 (368 MB)
Error downloading object: public/Videos/PythonCalc.mp4 (adfdf37): Smudge error: Error downloading public/Videos/PythonCalc.mp4 (adfdf371e863741df3af4755413fae738891f5c794f28fd5564879b2a7ddb35b): batch request: missing protocol: ""
Errors logged to /opt/build/repo/.git/lfs/logs/20220121T005427.736137478.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: public/Videos/PythonCalc.mp4: smudge filter lfs failed
4:54:27 PM: Creating deploy upload records
4:54:27 PM: Failing build: Failed to prepare repo
4:54:27 PM: Failed during stage 'preparing repo': exit status 128
4:54:28 PM: Finished processing build request in 8.446701277s
I just figured out how to use LFS and when I started looking into the error its saying netlify doesnt have permission? Thanks for the help.
You need to setup netlify to support large media by running
netlify lm:setup. It will verify and install everything you need and generate a .lfsconfig file.
See Netlify Large Media Documentation

Deploy React JS SPA in Openshift

I have build a React JS app and triggered yarn build command. Its builded successfully and if I run yarn global add serve, its working perfectly on http://localhost:5000. After that I tried below link to deploy this code to OpenShift.
OpenShift Deployment
According to the document, I tried to run npx nodeshift --strictSSL=false --dockerImage=bucharestgold/centos7-s2i-web-app --imageTag=10.13.0 --build.env YARN_ENABLED=true --expose
Then I got this log -
npx: installed 216 in 37.284s
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:25:35
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\index.js:23:39
2019-12-21T11:58:07.841Z INFO loading configuration
kubernetes-client deprecated fromKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig- ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\nodeshift-config.js:35:32
2019-12-21T11:58:07.882Z INFO using namespace smart-learner at https://c101-e.jp-tok.containers.cloud.ibm.com:30512
kubernetes-client deprecated Client({ config }), see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:95:18
kubernetes-client deprecated Request() without a .kubeconfig option, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\kubernetes-client\lib\swagger-client.js:200:19
2019-12-21T11:58:07.928Z WARNING a file property was not found in your package.json, archiving the current directory.
2019-12-21T11:58:07.929Z INFO creating archive of .gitignore, build, Dockerfile, package-lock.json, package.json, public, README.md, src, yarn.lock
2019-12-21T11:58:09.001Z INFO using existing build configuration smartlearner-s2i
2019-12-21T11:58:09.377Z INFO using existing image stream smartlearner
2019-12-21T11:58:09.378Z INFO uploading binary archive C:\ReactAPP\smartlearner/tmp/nodeshift/build/archive.tar
2019-12-21T11:58:15.825Z INFO binary upload complete
2019-12-21T11:58:15.828Z INFO waiting for build to finish
kubernetes-client deprecated .getStream use .getByteStream, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\build-watcher.js:56:107
2019-12-21T11:58:19.798Z TRACE Using bucharestgold/centos7-s2i-web-app:10.x as the s2i builder image
2019-12-21T11:58:20.550Z TRACE ls: cannot access /tmp/src/node_modules: No such file or directory
2019-12-21T11:58:20.564Z TRACE ---> Installing application source
2019-12-21T11:58:20.585Z TRACE ---> Building your Web Application from source
2019-12-21T11:58:20.592Z TRACE Current git config
2019-12-21T11:58:20.620Z TRACE url.https://github.com.insteadof=git#github.com:
2019-12-21T11:58:20.629Z TRACE url.https://.insteadof=ssh://
2019-12-21T11:58:20.629Z TRACE url.https://github.com.insteadof=ssh://git#github.com
2019-12-21T11:58:20.630Z TRACE ---> Using 'yarn install' with YARN_ARGS
2019-12-21T11:58:21.356Z TRACE yarn install v1.10.1
2019-12-21T11:58:21.594Z TRACE warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
2019-12-21T11:58:21.657Z TRACE [1/4] Resolving packages...
2019-12-21T11:58:23.111Z TRACE [2/4] Fetching packages...
2019-12-21T11:58:53.081Z TRACE error #typescript-eslint/eslint-plugin#2.10.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "10.12.0"
2019-12-21T11:58:53.083Z TRACE error Found incompatible module
2019-12-21T11:58:53.086Z TRACE info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2019-12-21T11:58:58.441Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-web-app:10.x
2019-12-21T11:59:00.497Z ERROR build failed with message: Assemble script failed.
2019-12-21T11:59:00.503Z ERROR Assemble script failed.
i am not able to understand what I am missing here. I found that bucharestgold/centos7-s2i-web-app has been depreicated and tried with npx nodeshift --strictSSL=false --dockerImage=nodeshift/ubi8-s2i-web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000 --expose. This is also throwing same error message.
You can use the new web-app flag feature and let nodeshift set the appropriate docker image.
Try running this command instead npx nodeshift --web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000

Resources