-
Notifications
You must be signed in to change notification settings - Fork 86
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
TypeError: "file" argument must be a non-empty string #48
Comments
I have the same problem on Mac |
I can not reproduce on linux:
Can you please provide more details? |
I cannot reproduce it on Mac:
|
For example I want to export this file https://github.com/doczhcn/istio/blob/master/docs/img/mesh-expansion.svg to png. svgexport mesh-expansion.svg mesh-expansion.png
child_process.js:383
throw new TypeError('"file" argument must be a non-empty string');
^
TypeError: "file" argument must be a non-empty string
at normalizeSpawnArguments (child_process.js:383:11)
at Object.exports.spawn (child_process.js:496:38)
at render (/usr/local/lib/node_modules/svgexport/index.js:124:26)
at Object.cli (/usr/local/lib/node_modules/svgexport/index.js:24:5)
at Object.<anonymous> (/usr/local/lib/node_modules/svgexport/bin/index.js:2:16)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3) |
hmm, still exports fine on Mac:
|
So strange. I have no idea. 🤷♂️ |
Could it be phantomjs related issue?
|
npm ls phantomjs-prebuilt -g
/usr/local/lib
└─┬ svgexport@0.3.2
└── phantomjs-prebuilt@2.1.16 |
To anyone facing this problem, please note that the latest node version (9.2) |
I am having the same problem. I attached a Dockerfile to reproduce the problem.
|
UPDATE / WORKAROUND: I found a related issue here: ariya/phantomjs#14186 (comment) Using the approach described there, I could make it work by changing the Dockerfile above to the following:
|
"file" argument must be a non-empty string getting error |
When I used
svgexport a.svg b.png
, it appear the error remider that:The text was updated successfully, but these errors were encountered: