Error while deploying swift application

50 views
Skip to first unread message

Matt Sanford

unread,
Jan 8, 2019, 8:00:50 PM1/8/19
to Google App Engine
I followed the tutorial here but when I run `gcloud app deploy` I get this error `'Munger-API' /root/Munger-API: error: could not find source files for target(s): Munger-API; use the 'path' property in the Swift 4 manifest to set a custom target path`. 

My local project structure looks like this:

Munger-API
---Package.swift
--- Sources
---- main.swift
----- foo
-------- foo.swift
------ bar
-------- bar.swift

I'd really appreciate any insight

George (Cloud Platform Support)

unread,
Jan 9, 2019, 3:10:33 PM1/9/19
to Google App Engine
Hello Matt, 

What directory are you in, when you run the "gcloud app deploy" command? You are expected to be in the top-level directory, where the app.yaml configuration file is present. 

You seem to lack a directory, by reference to: 

TopLevelDirectory
  |- Package.swift
  |- Sources
       |- MyAppName
             |- MyAppNameSource1.swift
             |- MyAppNameSource2.swift

A directory named analogous to "MyAppName" seems to be missing. 

It may prove helpful, for the sake of investigation, to actually use the "path" property, as advised in the error message, and determine this way which path is missing. 

Matt Sanford

unread,
Jan 10, 2019, 5:23:18 PM1/10/19
to Google App Engine
You were certainly right, I added the "path" but now I am facing a different issue. The Perfect library has a dependency that requires openssl 1.0.2 but the version that is installed is 1.0.1 so the module is failing to compile. It seems as though the tutorial that was posted is severely out of date.

Tiago (Google Cloud Platform Support)

unread,
Jan 15, 2019, 4:29:18 PM1/15/19
to Google App Engine
Hi Matt,

Indeed, this tutorial was originally published in March 20, 2017, and many things have changed since then. both in Google Cloud and in Swift.

If you’re still searching for a similar HelloWorld tutorial, I would suggest taking a look at this repository from the Google Cloud Platform on Kitura, another popular web framework and HTTP server implemented in Swift. Just make sure to change in the Package.swift file the majorVersion to 2 and the minor to 6 in order to run the most up-to-date Kitura version available.
Reply all
Reply to author
Forward
0 new messages