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

Error on large html #39

Closed
Bartvds opened this issue Dec 13, 2013 · 4 comments
Closed

Error on large html #39

Bartvds opened this issue Dec 13, 2013 · 4 comments

Comments

@Bartvds
Copy link

Bartvds commented Dec 13, 2013

I get this scary error then using long html strings:

Fatal error: spawn ENAMETOOLONG�
Error: spawn ENAMETOOLONG
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)� Use --force to continue.

    Aborted due to warnings.
@brenden
Copy link
Owner

brenden commented Dec 16, 2013

Ahhhh of course! So in retrospect this siteType option needs to be implemented differently, it should just write to a file rather than unsafely pass the potentially long string as an argument to the process. Of course, writing to a file is something the caller could do anyways, so I don't think there's actually a need for this option.

As for #40, you should be able to just use a file:// path to load a local file, which is what's done in the tests.

@Bartvds
Copy link
Author

Bartvds commented Dec 16, 2013

For writing to temporary files there is https://npmjs.org/package/tmp that could make it easy get a temp path that gets removed after the session.

I replied to your comment on #40 in it's own thread (as that is my original issue for now).

@brenden
Copy link
Owner

brenden commented Dec 17, 2013

Thanks for the pointer, the tmp module should be helpful in implementing a fix for this issue.

@Bartvds
Copy link
Author

Bartvds commented Dec 18, 2013

I see it, very nice.

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