PrismarineJS/prismarine-viewer

How to install on macOS without requiring installation of XCode? #122

theonlygusti posted onGitHub

npm install primsarine-viewer --save leads to the error

npm ERR! Traceback (most recent call last):
npm ERR!   File "./node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1500, in XcodeVersion
npm ERR!     version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
npm ERR!   File "./node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1563, in GetStdoutQuiet
npm ERR!     raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
npm ERR! gyp.common.GypError: Error 1 running xcodebuild

When I try to run xcodebuild myself I get the error:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Can I install this project without (I'm presuming what the above errors are about) installing xcode.app?


What macOS version do you have? Did you install Xcode previously?

posted by extremeheat about 4 years ago

There’s native modules to install so you do need to have Xcode installed to get all the compiler tools. Though I believe that these are only needed for headless, so we could make it an optional dependency.

posted by extremeheat about 4 years ago

What macOS version do you have? Did you install Xcode previously?

Catalina 10.15.7, and I have not installed xcode before although I do have the command line tools installed

posted by theonlygusti about 4 years ago
posted by extremeheat about 4 years ago

Thanks, I don't want to install Xcode though. I guess I won't use prismarine-viewer for now?

posted by theonlygusti about 4 years ago

@theonlygusti I removed the problematic dependencies, you should be able to install v1.13.3 can you try it ?

posted by Karang about 4 years ago

@Karang it installed without any issues at all, and I've just tested it and it opens in the browser and shows me the world. Seems perfect so far!

I wonder, will this new version have any limitations since it doesn't use those parts of xcode?

posted by theonlygusti about 4 years ago

You won't be able to use headless mode (to record a video or take a screenshot without a browser) unless you install node-canvas-webgl manually, but all browser examples should work.

posted by Karang about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests