-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Works in everything EXCEPT Electron #135
Comments
My team had to target a specific version of browser-run after the build started failing where I work. It was kinda annoying but we got through it. Thanks for taking the time and opening this though. I believe it's the same issue. We added this to our package.json file as a workaround for the error message you are referencing. |
One of the developers I work with narrowed it down to: https://github.com/juliangruber/browser-run/blob/master/lib/launch.js#L12 v3.5.0...master#diff-8e402bf78d4c5f8a4fb797709e5bc7a3R12 Worked up until 3.6.0 (first occurrence of break) |
Oh, dang, yeah that only doesn't work in electron currently. Will get a fix out this week! |
(will also add tests for this!) |
can you check if 4.0.2 works for you? |
To test this I'd need to update my tape-run version from 2.1.4 -> 3.0.0. 🤔 |
@juliangruber Removed browser-run from my package file and instead installed 3.0.0 of tape-run. I still got the same error though.
|
It may be working now, but I'm not certain and the issue flipped. I am able to complete a test run, but a bunch of my tests aren't running. I went to rule out Electron itself as the problem but now --port and -b are doing what the Electron path perviously did. With -b, the browser opens and then just waits for a server response forever. When I connect via port I get the same behavior. If the browser is waiting and I Ctrl-C browser-run, the browser immediately reports that it can't connect to the server, so I know it's trying to connect and run and there's just nothing responding. |
you could run this with [email protected] or [email protected]. Also make sure to clean your npm cache before upgrading ( One syntax error bug was fixed yesterday. |
Update (I work with @nstanard): ran with [email protected] and [email protected] (after cache clean) and got |
the |
I don't know what I could be getting wrong in my setup, but I can't seem to make this work using Electron.
Running with
cat build/index.html | browser-run --input html --static build
Folder structure is
index.html is
I've stripped down my bundle so that the only code going into it is some babel runtime code and:
If I use the -b or --port options, everything works as expected. If I leave those options off, Electron tries to run but just outputs
SyntaxError: Unexpected token <
and immediately exits.Adding
--basedir build
causes Electron to create a file called.source.[timestamp].html
and the contents of that file are:However, nothing is output and Electron just hangs until I hit Ctrl-C.
Meanwhile, using a browser (-b or --port), I get exactly the output I expect:
The text was updated successfully, but these errors were encountered: