Home
Support Forums

Sapper template fails to build out of the box, error comes up with no results

I am trying to build just the sapper template with the standard build settings and am getting an error and build fail. I cant find anyone else with this error on google.

My site is joystick-nebula.

Here is the log

11:58:12 PM: Build ready to start
11:58:15 PM: build-image version: 253f72909528f25a82c4640ca58f2e974d52abd9
11:58:15 PM: build-image tag: v3.4.4
11:58:15 PM: buildbot version: d7fbddb77714d524c4b4de0312067b122124afee
11:58:15 PM: Building without cache
11:58:15 PM: Starting to prepare the repo for build
11:58:15 PM: No cached dependencies found. Cloning fresh repo
11:58:15 PM: git clone https://github.com/levyadams/frontend
11:58:16 PM: Preparing Git Reference refs/heads/master
11:58:17 PM: Starting build script
11:58:17 PM: Installing dependencies
11:58:17 PM: Python version set to 2.7
11:58:19 PM: v12.18.0 is already installed.
11:58:20 PM: Now using node v12.18.0 (npm v6.14.4)
11:58:20 PM: Started restoring cached build plugins
11:58:20 PM: Finished restoring cached build plugins
11:58:20 PM: Attempting ruby version 2.7.1, read from environment
11:58:21 PM: Using ruby version 2.7.1
11:58:22 PM: Using PHP version 5.6
11:58:22 PM: 5.2 is already installed.
11:58:22 PM: Using Swift version 5.2
11:58:22 PM: Started restoring cached node modules
11:58:22 PM: Finished restoring cached node modules
11:58:22 PM: Installing NPM modules using NPM version 6.14.4
11:58:30 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
11:58:30 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/rollup/node_modules/fsevents):
11:58:30 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
11:58:30 PM: npm WARN TODO@0.0.1 No repository field.
11:58:30 PM: npm WARN TODO@0.0.1 No license field.
11:58:30 PM: added 235 packages from 159 contributors and audited 237 packages in 7.214s
11:58:30 PM: 12 packages are looking for funding
11:58:30 PM: run npm fund for details
11:58:30 PM: found 0 vulnerabilities
11:58:30 PM: NPM modules installed
11:58:31 PM: Started restoring cached go cache
11:58:31 PM: Finished restoring cached go cache
11:58:31 PM: go version go1.14.4 linux/amd64
11:58:31 PM: go version go1.14.4 linux/amd64
11:58:31 PM: Installing missing commands
11:58:31 PM: Verify run directory
11:58:32 PM: ​
11:58:32 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:32 PM: β”‚ Netlify Build β”‚
11:58:32 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:32 PM: ​
11:58:32 PM: ❯ Version
11:58:32 PM: @netlify/build 5.2.1
11:58:32 PM: ​
11:58:32 PM: ❯ Flags
11:58:32 PM: deployId: 5fa4d7e4608cbd7ef928f53d
11:58:32 PM: mode: buildbot
11:58:32 PM: ​
11:58:32 PM: ❯ Current directory
11:58:32 PM: /opt/build/repo
11:58:32 PM: ​
11:58:32 PM: ❯ Config file
11:58:32 PM: No config file was defined: using default values.
11:58:32 PM: ​
11:58:32 PM: ❯ Context
11:58:32 PM: production
11:58:32 PM: ​
11:58:32 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:32 PM: β”‚ 1. Build command from Netlify app β”‚
11:58:32 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:32 PM: ​
11:58:32 PM: $ npx sapper export
11:58:32 PM: > Building…
11:58:35 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:35 PM: β”‚ built client β”‚
11:58:35 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:35 PM: 19.5 kB client.a02bb64f.js
11:58:35 PM: β”‚ src/node_modules/@sapper/app.mjs (35.3%)
11:58:35 PM: β”‚ node_modules/svelte/internal/index.mjs (24.1%)
11:58:35 PM: β”‚ src/node_modules/@sapper/internal/App.svelte (14.7%)
11:58:35 PM: β”‚ src/components/Nav.svelte (7.9%)
11:58:35 PM: β”‚ src/routes/_error.svelte (7.1%)
11:58:35 PM: β”‚ src/routes/_layout.svelte (4.5%)
11:58:35 PM: β”‚ node_modules/svelte/store/index.mjs (3.3%)
11:58:35 PM: β”‚ src/node_modules/@sapper/internal/manifest-client.mjs (2.8%)
11:58:35 PM: β”‚ src/client.js (0.1%)
11:58:35 PM: β”” src/node_modules/@sapper/internal/shared.mjs (0.0%)
11:58:35 PM: 559 B inject_styles.5607aec6.js
11:58:35 PM: β”” inject_styles.js
11:58:35 PM: 1.49 kB index.6ea88b1c.js
11:58:35 PM: β”‚ src/routes/index.svelte (98.4%)
11:58:35 PM: β”” src/node_modules/images/successkid.jpg (1.6%)
11:58:35 PM: 760 B about.8a410520.js
11:58:35 PM: β”” src/routes/about.svelte
11:58:35 PM: 1.7 kB index.1d4878d9.js
11:58:35 PM: β”” src/routes/blog/index.svelte
11:58:35 PM: 1.11 kB [slug].22682730.js
11:58:35 PM: β”” src/routes/blog/[slug].svelte
11:58:36 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:36 PM: β”‚ built server β”‚
11:58:36 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:36 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:36 PM: β”‚ built serviceworker β”‚
11:58:36 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:36 PM: > Built in 4.2s
11:58:37 PM: > Crawling http://localhost:3000/
11:58:37 PM: 2.02 kB index.html
11:58:37 PM: 1.64 kB service-worker-index.html
11:58:37 PM: 3.13 kB favicon.png
11:58:37 PM: 1.49 kB client/index.6ea88b1c.js
11:58:37 PM: 377 B client/index-39716d32.css
11:58:37 PM: 559 B client/inject_styles.5607aec6.js
11:58:37 PM: 19.5 kB client/client.a02bb64f.js
11:58:37 PM: 860 B client/client-e118e612.css
11:58:37 PM: 584 B global.css
11:58:37 PM: 324 B manifest.json
11:58:37 PM: 78.7 kB client/465898c830bb9d2c.jpg
11:58:37 PM: 319 B blog.json
11:58:37 PM: 1.65 kB about/index.html
11:58:37 PM: 2.44 kB blog/index.html
11:58:37 PM: 760 B client/about.8a410520.js
11:58:37 PM: 52 B client/index-7ed37c94.css
11:58:37 PM: 1.7 kB client/index.1d4878d9.js
11:58:37 PM: 1.34 kB blog/what-is-sapper.json
11:58:37 PM: 611 B blog/how-to-use-sapper.json
11:58:37 PM: 603 B blog/why-the-name.json
11:58:37 PM: 1.43 kB blog/how-is-sapper-different-from-next.json
11:58:37 PM: 371 B blog/how-can-i-get-involved.json
11:58:37 PM: 4.66 kB blog/what-is-sapper/index.html
11:58:37 PM: 3.06 kB blog/why-the-name/index.html
11:58:37 PM: 3.29 kB blog/how-to-use-sapper/index.html
11:58:37 PM: 2.59 kB blog/how-can-i-get-involved/index.html
11:58:37 PM: 5.08 kB blog/how-is-sapper-different-from-next/index.html
11:58:37 PM: 366 B client/[slug]-5bc8f95f.css
11:58:37 PM: 1.11 kB client/[slug].22682730.js
11:58:37 PM: > Finished in 4.8s. Type npx serve sapper/export to run the app.
11:58:37 PM: ​
11:58:37 PM: (build.command completed in 4.9s)
11:58:37 PM: ​
11:58:37 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11:58:37 PM: β”‚ Netlify Build Complete β”‚
11:58:37 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
11:58:37 PM: ​
11:58:37 PM: (Netlify Build completed in 5s)
11:58:37 PM: Caching artifacts
11:58:37 PM: Started saving node modules
11:58:37 PM: Finished saving node modules
11:58:37 PM: Started saving build plugins
11:58:37 PM: Finished saving build plugins
11:58:37 PM: Started saving pip cache
11:58:37 PM: Finished saving pip cache
11:58:37 PM: Started saving emacs cask dependencies
11:58:37 PM: Finished saving emacs cask dependencies
11:58:37 PM: Started saving maven dependencies
11:58:37 PM: Finished saving maven dependencies
11:58:37 PM: Started saving boot dependencies
11:58:37 PM: Finished saving boot dependencies
11:58:37 PM: Started saving go dependencies
11:58:37 PM: Finished saving go dependencies
11:58:40 PM: Build script success
11:58:40 PM: Failing build: Failed to build site
11:58:40 PM: Failed during stage β€˜building site’: Deploy directory β€˜__sapper/export’ does not exist
11:58:40 PM: Finished processing build request in 25.924584852s

As you can see it is all standard. I haven’t touched the project itself, just cloned it from the sapper website npx command, put it on github and tried to build. I did this after a build failed repeatedly for my own sapper project, so I wanted to see what it was I was doing wrong, and can’t even get this one to work out of the box.

What am I doing wrong exactly? Thank you for reading

Well, the build seems to be going all right, the problem is that the deploy directory doesn’t exist. Are you sure this is the correct directory where the built files will exist: __sapper/export?. Also, the settings screenshot that you showed seems to show some other deploy directory: _sapper_/export.

I’d suggest, build the website locally once, check what the final publish directory turns out to be and then edit the settings in your dashboard, or use a netlify.toml file.

EDIT: I just checked your repo and it turns out the the directory that should actually be used to deploy is __sapper__/export (note: there are 2 _ before and after the word sapper).

1 Like

Gosh I feel dumb now. Thank you so much, I hope you have a great weekend and an amazing life!

1 Like