You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been banging my head against the wall for a couple days trying to figure out why Wordnik's API server was returning an empty body for all my API calls on my development box, while it was working fine on our production server, when I finally discovered the problem.
On Windows, path.join uses '\' as the path segment separator character. On Linux, it uses '/' instead. And apparently, Wordnik's API server doesn't understand that these two separator characters are equivalent, so for Windows clients it returns an empty body - resulting in the error message in the title of this issue.
The fix is to add the following after line 123 in wordnik.js:
route = route.replace(new RegExp(/\\/,'g'), '/');
Hope this helps anyone else experiencing similar trouble with this module.
The text was updated successfully, but these errors were encountered:
I've been banging my head against the wall for a couple days trying to figure out why Wordnik's API server was returning an empty body for all my API calls on my development box, while it was working fine on our production server, when I finally discovered the problem.
On Windows, path.join uses
'\'
as the path segment separator character. On Linux, it uses'/'
instead. And apparently, Wordnik's API server doesn't understand that these two separator characters are equivalent, so for Windows clients it returns an empty body - resulting in the error message in the title of this issue.The fix is to add the following after line 123 in
wordnik.js
:route = route.replace(new RegExp(/\\/,'g'), '/');
Hope this helps anyone else experiencing similar trouble with this module.
The text was updated successfully, but these errors were encountered: