Deploy failed from build

I’ve tried to place what was told to me about the .toml file and seems I have the correct configurztion, but the build is stil failing.

here is my deploy:

I’d really appreciate some assistence.

Seems like ‘Paste’ command didn’t work. :joy: Just kidding.

Kindly update it with the link or deploy log.

6:04:10 PM: Build ready to start

6:04:11 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41

6:04:11 PM: build-image tag: v3.5.0

6:04:11 PM: buildbot version: 1ba1edc027724f9c3e0906641d7cd0b5223a3593

6:04:11 PM: Building without cache

6:04:11 PM: Starting to prepare the repo for build

6:04:12 PM: No cached dependencies found. Cloning fresh repo

6:04:12 PM: git clone https://github.com/brianboros7/frontend-career-path

6:04:13 PM: Preparing Git Reference refs/heads/master

6:04:14 PM: Failing build: Failed to parse configuration

6:04:14 PM: Failed during stage ‘Reading and parsing configuration files’:
Base directory does not exist: /opt/build/repo/frontend-career-path

: exit status 1

6:04:14 PM: Finished processing build request in 3.198731306s

I guess this mentions it clearly. You have entered your repo name as the base directory. Remove the value set for the base directory from your website settings and netlify.toml file. This should fix it, if not, we can troubleshoot further.

Here is the new deploy log after taking out the root directory for the build :slight_smile: 11:42:30 AM: Build ready to start

11:42:32 AM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41

11:42:32 AM: build-image tag: v3.5.0

11:42:32 AM: buildbot version: 2f5a3acddf50c525cbeeabf40316b7aef08e37c9

11:42:32 AM: Building without cache

11:42:32 AM: Starting to prepare the repo for build

11:42:33 AM: No cached dependencies found. Cloning fresh repo

11:42:33 AM: git clone https://github.com/brianboros7/frontend-career-path

11:42:33 AM: Preparing Git Reference refs/heads/master

11:42:35 AM: Failing build: Failed to parse configuration

11:42:35 AM: Failed during stage ‘Reading and parsing configuration files’:
When resolving config file /opt/build/repo/netlify.toml:
Could not parse configuration file
Expected “=” or [ \t] but “\n” found.

: exit status 1

11:42:35 AM: Finished processing build request in 3.038933058s

Ahh, my bad, I should have been more clear. Remove the build parameter completely from your netlify.toml.

Just make your netlify.toml like this:

[build]
  publish = "build"
  command = "echo 'default context'"
  functions = "functions"

This should do it. However’ I’m sceptical about your build command. Are you sure that’s it?

Also, if you’re not going to use Netlify Functions, remove the functions line as well.

Here is what I have in my toml file now:

# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]

# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
# If not set, defaults to the root directory.
 

# Directory that contains the deploy-ready HTML files and assets generated by
# the build. This is relative to the base directory if one has been set, or the
# root directory if a base has not been set. This sample publishes the
# directory located at the absolute path "root/project/build-output"
publish = "build/"

# Default build command.
command = "echo 'default context'"

Here is my deploy log. again:

12:37:10 PM: Build ready to start

12:37:12 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41

12:37:12 PM: build-image tag: v3.5.0

12:37:12 PM: buildbot version: 2f5a3acddf50c525cbeeabf40316b7aef08e37c9

12:37:12 PM: Building without cache

12:37:12 PM: Starting to prepare the repo for build

12:37:12 PM: No cached dependencies found. Cloning fresh repo

12:37:12 PM: git clone https://github.com/brianboros7/frontend-career-path

12:37:13 PM: Preparing Git Reference refs/heads/master

12:37:15 PM: Failing build: Failed to parse configuration

12:37:15 PM: Failed during stage 'Reading and parsing configuration files':
Base directory does not exist: /opt/build/repo/project

: exit status 1

Also, no I’m not sure that’s it for my build command. I have tried to read and I have honestly no idea and is why I’m mail you. Thanks a ton and hoping to resolve this.

12:37:15 PM: Finished processing build request in 3.01441339s

I mentioned the contents of the netlify.toml that you might need. You can empty your current netlify.toml and just paste this in it:

[build]
  publish = "build"
  command = "echo 'default context'"

For some reason, your base directory is set to project. Kindly clear those settings from your Netlify Dashboard (if set).

Well, I don’t know how (using what framework) you’re building the website (since your package.json is technically empty). Do you know what framework or something are you using?

No framework. I didn’t knwo if I needed a pack.json even for this. I realized I didn’t. This is literally a basic thml and js based site. Literally a barebones site.

here is my last deploy log: (I really thought this one was going to go" it says no build directory. I didn’t know it needed oen as I just took it out due to having projects there too…
1:08:41 PM: Build ready to start
1:08:42 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41
1:08:42 PM: build-image tag: v3.5.0
1:08:42 PM: buildbot version: 2f5a3acddf50c525cbeeabf40316b7aef08e37c9
1:08:43 PM: Building without cache
1:08:43 PM: Starting to prepare the repo for build
1:08:43 PM: No cached dependencies found. Cloning fresh repo
1:08:43 PM: git clone https://github.com/brianboros7/frontend-career-path
1:08:44 PM: Preparing Git Reference refs/heads/master
1:08:45 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘’ in the Netlify UI
1:08:45 PM: Starting build script
1:08:45 PM: Installing dependencies
1:08:45 PM: Python version set to 2.7
1:08:47 PM: v12.18.0 is already installed.
1:08:47 PM: Now using node v12.18.0 (npm v6.14.4)
1:08:48 PM: Started restoring cached build plugins
1:08:48 PM: Finished restoring cached build plugins
1:08:48 PM: Attempting ruby version 2.7.1, read from environment
1:08:49 PM: Using ruby version 2.7.1
1:08:49 PM: Using PHP version 5.6
1:08:49 PM: Started restoring cached node modules
1:08:49 PM: Finished restoring cached node modules
1:08:50 PM: Installing NPM modules using NPM version 6.14.4
1:08:51 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
1:08:51 PM: npm WARN frontend-career-path@1.0.0 No description
1:08:51 PM: npm WARN frontend-career-path@1.0.0 No repository field.
1:08:51 PM: npm WARN frontend-career-path@1.0.0 No license field.
1:08:51 PM: up to date in 0.276s
1:08:51 PM: found 0 vulnerabilities
1:08:51 PM: NPM modules installed
1:08:51 PM: Started restoring cached go cache
1:08:51 PM: Finished restoring cached go cache
1:08:51 PM: go version go1.14.4 linux/amd64
1:08:51 PM: go version go1.14.4 linux/amd64
1:08:51 PM: Installing missing commands
1:08:51 PM: Verify run directory
1:08:53 PM: ​
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: Netlify Build
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: ​
1:08:53 PM: ❯ Version
1:08:53 PM: @netlify/build 6.0.0
1:08:53 PM: ​
1:08:53 PM: ❯ Flags
1:08:53 PM: deployId: 5fcfcf390faedb0b4f144498
1:08:53 PM: mode: buildbot
1:08:53 PM: ​
1:08:53 PM: ❯ Current directory
1:08:53 PM: /opt/build/repo
1:08:53 PM: ​
1:08:53 PM: ❯ Config file
1:08:53 PM: /opt/build/repo/netlify.toml
1:08:53 PM: ​
1:08:53 PM: ❯ Context
1:08:53 PM: production
1:08:53 PM: ​
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: 1. build.command from netlify.toml
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: ​
1:08:53 PM: $ echo ‘default context’
1:08:53 PM: default context
1:08:53 PM: ​
1:08:53 PM: (build.command completed in 19ms)
1:08:53 PM: ​
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: Netlify Build Complete
1:08:53 PM: ────────────────────────────────────────────────────────────────
1:08:53 PM: ​
1:08:53 PM: (Netlify Build completed in 74ms)
1:08:53 PM: Caching artifacts
1:08:53 PM: Started saving node modules
1:08:53 PM: Finished saving node modules
1:08:53 PM: Started saving build plugins
1:08:53 PM: Finished saving build plugins
1:08:53 PM: Started saving pip cache
1:08:53 PM: Finished saving pip cache
1:08:53 PM: Started saving emacs cask dependencies
1:08:53 PM: Finished saving emacs cask dependencies
1:08:53 PM: Started saving maven dependencies
1:08:53 PM: Finished saving maven dependencies
1:08:53 PM: Started saving boot dependencies
1:08:53 PM: Finished saving boot dependencies
1:08:53 PM: Started saving go dependencies
1:08:53 PM: Finished saving go dependencies
1:08:56 PM: Failed during stage ‘building site’: Deploy directory ‘build’ does not exist
1:08:56 PM: Build script success
1:08:56 PM: Deploy directory ‘build’ does not exist
1:08:56 PM: Failing build: Failed to build site
1:08:56 PM: Finished processing build request in 14.016451594s

Oh, I thought because you had a package.json, you’re using a framework. If it’s a vanilla HTML, CSS, JS website, you don’t need one at all. You won’t even need netlify.toml for this part.

You have 2 ways to deploy such a website:

Manually upload the folder of your website to Netlify yourself (recommended and faster) or use GitHub. If you choose to manually deploy, you just have to drag and drop the website folder to the Netlify UI. If you still want the GitHub way, you can just use this as your netlify.toml:

[build]
  base = "/"
  publish = "/"
  command = ""

Note: The above command is untested. I usually just drag and drop such kind of websites.

I didn’t know we could drag and drop, but is nice to have continuously deploys etc. I’ll try this new “/” etc. Thank you.

Hey, thanks a ton, I will try to upload it now. But when I add new files, I will ahve to reupload everytime? Or I feel that how will Netlify know where to place a certain file? Should I try to use Netlify CLI? I just really like the continously deploy process… I can’t seem to get this to deploy from github.

Wait, It finally worked… wow, wooohoo. Thanks a ton.

You just have to drag and drop the folder (with the index.html) in the deploys section of that website. Netlify detects and uploads the files that have changed and publishes the website.

Great!