I have a project with the following ssetup:
Package.swift
website
node_modules/
package.json
Package.swift
Note that there’s a Package.swift
in the website directory that contains a Gatsby website. The reason being is that without that file, Xcode will include the node_modules
directory in the Xcode project generated for the package, and because of that, Xcode is very slow.
My website on Netlify is set up to build from website/
. Netlify detects that there’s a package.json
and therefore it installs the dependencies using Yarn, and it does the same with Swift. However, it goes beyond that and it runs the swift build
command, ignoring the command that I specified it should use for building the website:
[build]
base = "website/"
publish = "public/"
command = "yarn build"
I don’t expect Netlify to run swift build
. However it does, and that causes the deployment to fail.