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

atom-shell asar package support #592

Closed
popopome opened this issue Apr 24, 2015 · 1 comment
Closed

atom-shell asar package support #592

popopome opened this issue Apr 24, 2015 · 1 comment

Comments

@popopome
Copy link

I'm developing windows desktop application with electron (aka atom-shell). My app uses browser-sync inside.
When I created asar package(a kind of tar package) and then launched my app,
it was crashed. I got an stack trace, and found the source of problem was 'File Not Found exception' at node_modules/browser-sync-ui/lib/hook.js, Ln: 11.

I found the final path for template file had mixed path separators as / and \. I believe the normal file access case has no problem, but asar package cannot handle well when path separators are mingled.

So I changed the code by using path.join method, then the problem was fixed.

function templateFile (filepath) {
    return fs.readFileSync(path.join(__dirname, "/../templates", filepath || ""), "utf-8");
}

Please check the path has valid form for the template file.

@shakyShane
Copy link
Contributor

thanks @popopome - all fixed in latest

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

2 participants