how do you deploy kotlin react project to netlify?
# javascript
s
how do you deploy kotlin react project to netlify?
b
The output is a static web content. So you deploy it the same way as you would any other static app (e.g. plain html or vanilla react). Internet is full of guides on that.
Your static bundle can be found in build/distributions
s
Yups. Thats what I got from docs. But getting following error:
Copy code
9:28:19 PM: Build ready to start
9:28:21 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
9:28:21 PM: build-image tag: v3.4.1
9:28:21 PM: buildbot version: db1c11c310036491f94882c0e310ea68c81c7e60
9:28:21 PM: Fetching cached dependencies
9:28:21 PM: Failed to fetch cache, continuing with build
9:28:21 PM: Starting to prepare the repo for build
9:28:21 PM: No cached dependencies found. Cloning fresh repo
9:28:21 PM: git clone <https://github.com/dragneelfps/self>
9:28:22 PM: Preparing Git Reference refs/heads/master
9:28:23 PM: Starting build script
9:28:23 PM: Installing dependencies
9:28:23 PM: Python version set to 2.7
9:28:25 PM: v12.18.0 is already installed.
9:28:25 PM: Now using node v12.18.0 (npm v6.14.4)
9:28:25 PM: Started restoring cached build plugins
9:28:25 PM: Finished restoring cached build plugins
9:28:25 PM: Attempting ruby version 2.7.1, read from environment
9:28:27 PM: Using ruby version 2.7.1
9:28:27 PM: Using PHP version 5.6
9:28:27 PM: 5.2 is already installed.
9:28:27 PM: Using Swift version 5.2
9:28:27 PM: Started restoring cached go cache
9:28:27 PM: Finished restoring cached go cache
9:28:27 PM: go version go1.14.4 linux/amd64
9:28:27 PM: go version go1.14.4 linux/amd64
9:28:27 PM: Installing missing commands
9:28:27 PM: Verify run directory
9:28:28 PM: 
9:28:28 PM: ┌─────────────────────────────┐
9:28:28 PM: │        Netlify Build        │
9:28:28 PM: └─────────────────────────────┘
9:28:28 PM: 
9:28:28 PM: ❯ Version
9:28:28 PM:   @netlify/build 5.0.0
9:28:28 PM: 
9:28:28 PM: ❯ Flags
9:28:28 PM:   deployId: 5f8b149b590e581137d5c0f0
9:28:28 PM:   mode: buildbot
9:28:28 PM: 
9:28:28 PM: ❯ Current directory
9:28:28 PM:   /opt/build/repo
9:28:28 PM: 
9:28:28 PM: ❯ Config file
9:28:28 PM:   No config file was defined: using default values.
9:28:28 PM: 
9:28:28 PM: ❯ Context
9:28:28 PM:   production
9:28:28 PM: 
9:28:28 PM: ┌───────────────────────────────────┐
9:28:28 PM: │ 1. Build command from Netlify app │
9:28:28 PM: └───────────────────────────────────┘
9:28:28 PM: 
9:28:28 PM: $ ./gradlew build
9:28:28 PM: bash: ./gradlew: Permission denied
9:28:28 PM: 
9:28:28 PM: ┌─────────────────────────────┐
9:28:28 PM: │   "build.command" failed    │
9:28:28 PM: └─────────────────────────────┘
9:28:28 PM: 
9:28:28 PM:   Error message
9:28:28 PM:   Command failed with exit code 126: ./gradlew build
9:28:28 PM: 
9:28:28 PM:   Error location
9:28:28 PM:   In Build command from Netlify app:
9:28:28 PM:   ./gradlew build
9:28:28 PM: 
9:28:28 PM:   Resolved config
9:28:28 PM:   build:
9:28:28 PM:     command: ./gradlew build
9:28:28 PM:     commandOrigin: ui
9:28:28 PM:     publish: /opt/build/repo/build/distributions
9:28:28 PM: Caching artifacts
9:28:28 PM: Started saving build plugins
9:28:28 PM: Finished saving build plugins
9:28:28 PM: Started saving pip cache
9:28:28 PM: Finished saving pip cache
9:28:28 PM: Started saving emacs cask dependencies
9:28:28 PM: Finished saving emacs cask dependencies
9:28:28 PM: Started saving maven dependencies
9:28:28 PM: Finished saving maven dependencies
9:28:28 PM: Started saving boot dependencies
9:28:28 PM: Finished saving boot dependencies
9:28:28 PM: Started saving go dependencies
9:28:28 PM: Finished saving go dependencies
9:28:31 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:28:31 PM: Failing build: Failed to build site
9:28:31 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
9:28:31 PM: Finished processing build request in 10.29469101s
I have this setting
image.png
this is my exec perms
b
Your build command itself seems to just be failing
Ah, i know what's up
While gradlew is executable on your local git, it's not on remote
Run git update-index --chmod=+x gradlew and commit
Should work afterwards. Although the log above does not mention jdk version, which might be missing
s
that worked
thanks a lot!!!!!!
b
Np. Had this issue plenty of times myself :p
107 Views