gluon
gluon copied to clipboard
Mac support for browser installed via homebrew
I installed my browser (firefox and chrome) via homebrew, when i run the gluworld example. i got error:
❯ node .
[Gluon] starting browser...
file:///Users/d/Data/labs/glutonis/node_modules/@gluon-framework/gluon/src/index.js:86
const [ browserPath, browserName ] = await findBrowserPath(forceBrowser);
^
TypeError: (intermediate value) is not iterable
at startBrowser (file:///Users/d/Data/labs/glutonis/node_modules/@gluon-framework/gluon/src/index.js:86:40)
at async Module.open (file:///Users/d/Data/labs/glutonis/node_modules/@gluon-framework/gluon/src/index.js:114:19)
at async file:///Users/d/Data/labs/glutonis/index.js:38:19
Can replicate
What node version are you using?
The examples seem to be using v19

What node version are you using?
v16.17.0
I'm going to try 19, I'll let you know how it goes.
Same problem
The issue is with the path for the Homebrew apps folders. Currently available paths by default:
darwin: {
chrome: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
...
}
@artamonovtech would it not be possible to find the executables from the PATH environment variable? Something like the which npm package.
Gluon already has support for starting browsers in path. Are Mac browsers (installed via homebrew) in path?
@CanadaHonk i believe its not:
I chose to install Firefox from Homebrew:
Full path:
/Applications/Firefox.app/Contents/MacOS/firefox
Seems to be resolved with last path finding rewrite.