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

Built Mac package shows yellow blank screen and doesn't load properly #57

Closed
RyanAtViceSoftware opened this issue Oct 17, 2015 · 6 comments
Labels

Comments

@RyanAtViceSoftware
Copy link
Contributor

I followed the steps on the Readme and got the app to run in the dev mode but when trying to package and run it as an app I get a blank yellow screen with the errors shown below.

image

I looked into the error and to get around this I had to switch the NODE_ENV to production so I changed the package.json like shown below.

Before

"package": "node package.js",

After

"package": "NODE_ENV=production node package.js",

Doing this got it to work but I'm not sure this is the best approach. Should I be setting the NODE_ENV in the terminal before I build? However, that feels wrong too.

@chentsulin
Copy link
Member

Oh, thanks for pointing out this. This should be a bug I introduced in 0.6.0..

Babel using NODE_ENV to determine whether should enable plugins or not :https://github.com/chentsulin/electron-react-boilerplate/blob/master/.babelrc#L4

"package": "NODE_ENV=production node package.js" looks great to me here.

@RyanAtViceSoftware
Copy link
Contributor Author

Oh cool, glad that's a viable solution. Did you want me to PR that?

@chentsulin
Copy link
Member

Sure, thanks for your help. Maybe we should take care build, package and package-all those three tasks.

@RyanAtViceSoftware
Copy link
Contributor Author

All the same way?

@chentsulin
Copy link
Member

The only one could be different is that "package-all": "npm run package -- --all" seems better.

@chentsulin
Copy link
Member

fixed via #59

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

No branches or pull requests

2 participants