I need advice to debug deploy Netlify App
hmm. I canβt see that deploy log. Did you delete or rename your account?
Maybe you can post the deploy log here? thanks.
Hi Perry, thanks for answering.
Iβve delete that site, because I thought i did something wrong from the begging(And didnβt know that i can still do manual deploys), but Iβm having same issue no matter what i do(I chose to manually deploy my changes)
I might say that Iβm pretty new at web development.
This is the log I've received, whenever i tried to work in continuous deployment.
12:41:31 AM: Build ready to start
12:41:33 AM: build-image version: 30f629161c0736b1a3ecd8b418e5eeffab5c0faf
12:41:33 AM: build-image tag: v3.3.14
12:41:33 AM: buildbot version: 960d989224ecbd0e01be03c5f7dffe3d8f543e02
12:41:33 AM: Fetching cached dependencies
12:41:33 AM: Failed to fetch cache, continuing with build
12:41:33 AM: Starting to prepare the repo for build
12:41:33 AM: No cached dependencies found. Cloning fresh repo
12:41:33 AM: git clone https://github.com/marcoserod/rickAndMorty
12:41:34 AM: Preparing Git Reference refs/heads/master
12:41:35 AM: Starting build script
12:41:35 AM: Installing dependencies
12:41:37 AM: Downloading and installing node v10.21.0...
12:41:37 AM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz...
12:41:38 AM: Computing checksum with sha256sum
12:41:38 AM: Checksums matched!
12:41:41 AM: Now using node v10.21.0 (npm v6.14.4)
12:41:41 AM: Started restoring cached build plugins
12:41:41 AM: Finished restoring cached build plugins
12:41:41 AM: Attempting ruby version 2.6.2, read from environment
12:41:42 AM: Using ruby version 2.6.2
12:41:42 AM: Using PHP version 5.6
12:41:43 AM: 5.2 is already installed.
12:41:43 AM: Using Swift version 5.2
12:41:43 AM: Started restoring cached go cache
12:41:43 AM: Finished restoring cached go cache
12:41:43 AM: go version go1.12 linux/amd64
12:41:43 AM: go version go1.12 linux/amd64
12:41:43 AM: Installing missing commands
12:41:43 AM: Verify run directory
12:41:44 AM: β
12:41:44 AM: βββββββββββββββββββββββββββββββ
12:41:44 AM: β Netlify Build β
12:41:44 AM: βββββββββββββββββββββββββββββββ
12:41:44 AM: β
12:41:44 AM: β― Version
12:41:44 AM: @netlify/build 1.0.14
12:41:44 AM: β
12:41:44 AM: β― Flags
12:41:44 AM: mode: buildbot
12:41:44 AM: β
12:41:44 AM: β― Current directory
12:41:44 AM: /opt/build/repo
12:41:44 AM: β
12:41:44 AM: β― Config file
12:41:44 AM: No config file was defined: using default values.
12:41:44 AM: β
12:41:44 AM: β― Context
12:41:44 AM: production
12:41:44 AM: β
12:41:44 AM: ββββββββββββββββββββββββββββββββββ
12:41:44 AM: β 1. Build command from settings β
12:41:44 AM: ββββββββββββββββββββββββββββββββββ
12:41:44 AM: β
12:41:44 AM: $ npm run build
12:41:45 AM: npm
12:41:45 AM: ERR! code ENOENT
12:41:45 AM: npm
12:41:45 AM: ERR! syscall open
12:41:45 AM: npm
12:41:45 AM: ERR!
12:41:45 AM: path
12:41:45 AM: /opt/build/repo/package.json
12:41:45 AM: npm
12:41:45 AM: ERR! errno
12:41:45 AM: -2
12:41:45 AM: npm ERR!
12:41:45 AM: enoent
12:41:45 AM: ENOENT: no such file or directory, open '/opt/build/repo/package.json'
12:41:45 AM: npm
12:41:45 AM: ERR!
12:41:45 AM: enoent This is related to npm not being able to find a file.
12:41:45 AM: npm
12:41:45 AM: ERR! enoent
12:41:45 AM: npm ERR!
12:41:45 AM: A complete log of this run can be found in:
12:41:45 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-06-07T03_41_45_295Z-debug.log
12:41:45 AM: β
12:41:45 AM: βββββββββββββββββββββββββββββββ
12:41:45 AM: β "build.command" failed β
12:41:45 AM: βββββββββββββββββββββββββββββββ
12:41:45 AM: β
12:41:45 AM: Error message
12:41:45 AM: Command failed with exit code 254: npm run build
12:41:45 AM: β
12:41:45 AM: Error location
12:41:45 AM: In Build command from settings:
12:41:45 AM: npm run build
12:41:45 AM: β
12:41:45 AM: Resolved config
12:41:45 AM: build:
12:41:45 AM: command: npm run build
12:41:45 AM: publish: /opt/build/repo/build
12:41:45 AM: Caching artifacts
12:41:45 AM: Started saving build plugins
12:41:45 AM: Finished saving build plugins
12:41:45 AM: Started saving pip cache
12:41:45 AM: Finished saving pip cache
12:41:45 AM: Started saving emacs cask dependencies
12:41:45 AM: Finished saving emacs cask dependencies
12:41:45 AM: Started saving maven dependencies
12:41:45 AM: Finished saving maven dependencies
12:41:45 AM: Started saving boot dependencies
12:41:45 AM: Finished saving boot dependencies
12:41:45 AM: Started saving go dependencies
12:41:45 AM: Finished saving go dependencies
12:41:49 AM: Error running command: Build script returned non-zero exit code: 1
12:41:49 AM: Failing build: Failed to build site
12:41:49 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
12:41:49 AM: Finished processing build request in 16.212399201s
This is my repo rickAndMorty/rick-morty at master Β· marcoserod/rickAndMorty Β· GitHub
This is my new site, if need i can create a new bug.
hey there, thanks for that. Could you pop a screenshot of your build settings please?
Hi, @marcoserod, this is the error from the build log:
8:41:45 PM: ENOENT: no such file or directory, open '/opt/build/repo/package.json'
Our build system clones the repo into the directory /opt/build/repo/
. The build command npm run build
looks for package.json
in the base of the repo (which again is /opt/build/repo/
). So, the build system is looking for this file:
/opt/build/repo/package.json
For this repo, however, the package.json file is located in the subdirectory rick-morty
.
This means the file (package.json
) is actually found here:
/opt/build/repo/rick-morty/package.json
The solution is to change the βBase directoryβ setting in the build settings to rick-morty
.
Please let us know if there are questions and/or if this does not resolve the issue.
Thanks @luke !
Thatβs works for me! Really appreciate the help