ngnjs / NGN

A systems development platform. A revamped portal is coming soon at:
https://ngn.js.org
MIT License
62 stars 14 forks source link

no proxy cache specified, EISDIR error #21

Closed mayorbyrne closed 12 years ago

mayorbyrne commented 12 years ago
Running NGN v0.0.1-alpha.21

I started a proxy server/controller with no cache specified. When I try to create/POST a virtual host, I get a 201 created error, but node craps out, citing the following error:

>node proxy.js

WARNING: Cannot find module 'C:\Users\Kevin\workspace\proxy\node_modules\ngn\lib
\ngnx\web\cache.json'. Using C:\Users\Kevin\workspace\proxy\cache.json instead.
Proxy Controller is ready

Functioning properly up til this point. The following block comes after the POST request.

========================================
Error: EISDIR, open 'C:\Users\Kevin\workspace\proxy'
========================================

events.js:66
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: EISDIR, open 'C:\Users\Kevin\workspace\proxy'

Also note that no .json file is created.

mayorbyrne commented 12 years ago

Corey, after dorking around with this, when it says using C:\Users\Kevin\workspace\proxy\cache.json, nothing is created. This error might be caused while trying to create the file itself, but it seems to not do anything until a request is fired off. If you create a blank cache.json file that simply looks like this

{ "remote": null, "cache": [] }

The error doesn't come up. So, when it says using xxxxxx/cache.json, I suggest (if possible) creating this blank dummy file in that directory. A completely blank file with the same filename will not work (same error), it needs that template.