Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Example Fails #30

Open
btx-systems opened this issue Jul 21, 2024 · 2 comments
Open

Building Example Fails #30

btx-systems opened this issue Jul 21, 2024 · 2 comments

Comments

@btx-systems
Copy link

btx-systems commented Jul 21, 2024

I am trying to run the example provided in the repo. However I am facing an issue when running npm run install

I saw that there was a previous issue #29 with a similar error and I have tried running sudo xcode-select --reset but this did not work. Here is the console output of running npm run install

I am on MacOS 15 Beta 2 with swift 6.0

warning: 'example': <unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/Library/Developer/CommandLineTools/usr/bin/swift-driver-new'
[2/2] Initializing...
warning: 'example': <unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/Library/Developer/CommandLineTools/usr/bin/swift-driver-new'
error: Invalid manifest (compiled with: ["/Library/Developer/CommandLineTools/usr/bin/swiftc", "-vfsoverlay", "/var/folders/5m/27vchnzd71z2l_86qn8sj9800000gn/T/TemporaryDirectory.EsqCmt/vfs.yaml", "-L", "/Library/Developer/CommandLineTools/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Library/Developer/CommandLineTools/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk", "-swift-version", "6", "-I", "/Library/Developer/CommandLineTools/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk", "-package-description-version", "6.0.0", "/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/[email protected]", "-o", "/var/folders/5m/27vchnzd71z2l_86qn8sj9800000gn/T/TemporaryDirectory.AK1GQY/node-swift-manifest"])
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/Library/Developer/CommandLineTools/usr/bin/swift-driver-new'
/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/[email protected]:4:8: error: no such module 'CompilerPluginSupport'
 2 | 
 3 | import PackageDescription
 4 | import CompilerPluginSupport
   |        `- error: no such module 'CompilerPluginSupport'
 5 | import Foundation
 6 |
/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/builder.js:259
                throw new Error(`swift build exited with status ${result.status}`);
                      ^

Error: swift build exited with status 1
    at Object.<anonymous> (/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/builder.js:259:23)
    at Generator.next (<anonymous>)
    at /Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/builder.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/builder.js:4:12)
    at Object.build (/Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/builder.js:60:12)
    at /Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/cli.js:61:23
    at Generator.next (<anonymous>)
    at /Users/jackfagan/Coding/YAFSR/node-swift/example/node_modules/node-swift/lib/cli.js:32:71
    at new Promise (<anonymous>)

Node.js v20.10.0
@kabiroberai
Copy link
Owner

Do you have Xcode installed? If you have Xcode and you're still getting this error, it could be in a non-standard location. What's the output of xcode-select -p, and does the output location exist? If not, try sudo xcode-select -s /path/to/Xcode.app.

@jameshfisher
Copy link

I had this issue. It was resolved by

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants