Launch github repo on netifly

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

Hey Support
this is the repo i want to deploy on netifly GitHub - deadslavez/dcl-netifly

i am facing trouble

3:50:16 AM: build-image version: a968751fa4fa5480005f9e300e07554d2cf87d06 (focal)
3:50:16 AM: buildbot version: 16b1763679bd714e032294dcf919120bca3a692a
3:50:16 AM: Building without cache
3:50:16 AM: Starting to prepare the repo for build
3:50:16 AM: No cached dependencies found. Cloning fresh repo
3:50:16 AM: git clone --filter=blob:none GitHub - deadslavez/dcl-netifly
3:50:17 AM: Preparing Git Reference refs/heads/a
3:50:22 AM: Parsing package.json dependencies
3:50:24 AM: Starting to install dependencies
3:50:24 AM: Python version set to 3.8
3:50:24 AM: Attempting Ruby version 2.7.2, read from environment
3:50:25 AM: Using Ruby version 2.7.2
3:50:25 AM: Started restoring cached go cache
3:50:25 AM: Finished restoring cached go cache
3:50:25 AM: Installing Go version 1.19.5 (requested 1.19.5)
3:50:31 AM: go version go1.19.5 linux/amd64
3:50:32 AM: Using PHP version 8.0
3:50:33 AM: v16.20.0 is already installed.
3:50:33 AM: Now using node v16.20.0 (npm v8.19.4)
3:50:33 AM: Enabling Node.js Corepack
3:50:33 AM: Started restoring cached build plugins
3:50:33 AM: Finished restoring cached build plugins
3:50:33 AM: Started restoring cached corepack dependencies
3:50:33 AM: Finished restoring cached corepack dependencies
3:50:33 AM: No npm workspaces detected
3:50:33 AM: Started restoring cached node modules
3:50:33 AM: Finished restoring cached node modules
3:50:34 AM: Installing npm packages using npm version 8.19.4
3:50:37 AM: added 25 packages, and audited 26 packages in 3s
3:50:37 AM: found 0 vulnerabilities
3:50:37 AM: npm packages installed
3:50:37 AM: Install dependencies script success
3:50:37 AM: Starting build script
3:50:38 AM: Detected 0 framework(s)
3:50:38 AM: Section completed: initializing
3:50:39 AM: ​
3:50:39 AM: Netlify Build
3:50:39 AM: ────────────────────────────────────────────────────────────────
3:50:39 AM: ​
3:50:39 AM: ❯ Version
3:50:39 AM: @netlify/build 29.10.1
3:50:39 AM: ​
3:50:39 AM: ❯ Flags
3:50:39 AM: baseRelDir: true
3:50:39 AM: buildId: 6452de1b920a5d005ad8ab81
3:50:39 AM: deployId: 6452de1b920a5d005ad8ab83
3:50:39 AM: ​
3:50:39 AM: ❯ Current directory
3:50:39 AM: /opt/build/repo
3:50:39 AM: ​
3:50:39 AM: ❯ Config file
3:50:39 AM: /opt/build/repo/netlify.toml
3:50:39 AM: ​
3:50:39 AM: ❯ Context
3:50:39 AM: production
3:50:39 AM: ​
3:50:39 AM: 1. Build command from Netlify app
3:50:39 AM: ────────────────────────────────────────────────────────────────
3:50:39 AM: ​
3:50:39 AM: $ npm run build
3:50:40 AM: > c57f8668-c2a5-4877-bd05-fcac69afe1c6@1.0.0 build
3:50:40 AM: > build-ecs
3:50:40 AM: > dev mode: true
3:50:40 AM: > working directory: /opt/build/repo
3:50:42 AM: > processing /src/game.ts
3:50:42 AM: Error /src/game.ts (228,14): Expected 0 arguments, but got 1.
3:50:42 AM: Error /src/game.ts (229,14): Expected 0 arguments, but got 1.
3:50:42 AM: Error /src/game.ts (230,14): Expected 0 arguments, but got 1.
3:50:42 AM: Error /src/game.ts (231,14): Expected 0 arguments, but got 1.
3:50:42 AM: Error /src/game.ts (232,14): Expected 0 arguments, but got 1.
3:50:42 AM: Error /src/game.ts (233,63): Type ‘“POINTER”’ is not assignable to type ‘ActionButton’.
3:50:42 AM: Error /src/game.ts (235,62): Type ‘“POINTER”’ is not assignable to type ‘ActionButton’.
3:50:42 AM: > bundling:
3:50:42 AM: - node_modules/@dcl/amd/dist/amd.js
3:50:42 AM: - node_modules/decentraland-ecs/dist/src/index.js
3:50:42 AM: - node_modules/@dcl/npc-scene-utils/dist/index.js
3:50:42 AM: - src/game.ts
3:50:42 AM: > writing /bin/game.js
3:50:42 AM: > writing /bin/game.js.lib
3:50:42 AM: Error: ! Error: compilation finished with 7 errors
3:50:42 AM: at /opt/build/repo/node_modules/@dcl/build-ecs/index.js:118:19
3:50:42 AM: at Generator.next ()
3:50:42 AM: at fulfilled (/opt/build/repo/node_modules/@dcl/build-ecs/index.js:6:58)
3:50:42 AM: at processTicksAndRejections (node:internal/process/task_queues:96:5)
3:50:42 AM: ​
3:50:42 AM: “build.command” failed
3:50:42 AM: ────────────────────────────────────────────────────────────────
3:50:42 AM: ​
3:50:42 AM: Error message
3:50:42 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
3:50:42 AM: ​
3:50:42 AM: Error location
3:50:42 AM: In Build command from Netlify app:
3:50:42 AM: npm run build
3:50:42 AM: ​
3:50:42 AM: Resolved config
3:50:42 AM: build:
3:50:42 AM: command: npm run build
3:50:42 AM: commandOrigin: ui
3:50:42 AM: edge_functions: /opt/build/repo/netlify/edge-functions
3:50:42 AM: publish: /opt/build/repo/dist
3:50:42 AM: publishOrigin: ui
3:50:42 AM: functionsDirectory: /opt/build/repo/functions
3:50:42 AM: Caching artifacts
3:50:42 AM: Started saving node modules
3:50:42 AM: Finished saving node modules
3:50:42 AM: Started saving build plugins
3:50:42 AM: Finished saving build plugins
3:50:42 AM: Started saving corepack cache
3:50:42 AM: Finished saving corepack cache
3:50:42 AM: Started saving pip cache
3:50:42 AM: Finished saving pip cache
3:50:42 AM: Started saving emacs cask dependencies
3:50:42 AM: Finished saving emacs cask dependencies
3:50:42 AM: Started saving maven dependencies
3:50:43 AM: Finished saving maven dependencies
3:50:43 AM: Started saving boot dependencies
3:50:43 AM: Finished saving boot dependencies
3:50:43 AM: Started saving rust rustup cache
3:50:43 AM: Finished saving rust rustup cache
3:50:43 AM: Started saving go dependencies
3:50:43 AM: Finished saving go dependencies
3:50:44 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:50:44 AM: Failing build: Failed to build site
3:50:44 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
3:50:45 AM: Finished processing build request in 28.506s

The better the post - the faster the answer.

This section of the log

refers to the following lines in src/games.ts

script1.init(options)
script2.init(options)
script3.init(options)
script4.init(options)
script5.init(options)

and is saying that you are passing options which was not expected. This is because, for example init() for Script1 accepts no arguments

init() {
    this.material = new BasicMaterial()
    this.material.texture = new Texture('846479b0-75d3-450d-bbd6-7e6b3355a7a2/models/transparent-texture.png')
    this.material.alphaTest = 1
  }

These two lines

refer to the "button": "POINTER", passed in the object on lines 233 and 235 which is apparent not valid.

it is working perfectly locally

i even tried this has the issue

When running in dev mode? Or have you built it locally too?

i build it locally with dcl sdk dcl means decentraland.

I tried your repo locally and while it works, I have a question. This doesn’t appear to be a site. It simply seems to output a JS file and a lib file. Are you trying to use Netlify as a remote CDN without actually hosting a site?