subzerocloud / postgrest-starter-kit

Starter Kit and tooling for authoring REST API backends with PostgREST
MIT License
744 stars 71 forks source link

Getting Cannot find module 'C:\Projects\postGrest\subzero-base-project' #56

Closed ElixirMike closed 5 years ago

ElixirMike commented 5 years ago

I installed the npm, docker and then the subzero cli (all seemed to install fine). I then run the command subzero base-project and am getting this error:

C:\Projects\postGrest>subzero base-project internal/modules/cjs/loader.js:783 throw err; ^

Error: Cannot find module 'C:\Projects\postGrest\subzero-base-project'  at Function.Module._resolveFilename (internal/modules/cjs/loader.js:780:15)  at Function.Module._load (internal/modules/cjs/loader.js:685:27)  at Function.Module.runMain (internal/modules/cjs/loader.js:1014:10)  at internal/main/run_main_module.js:17:11 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Any ideas what I'm missing? I'm running this on Windows 10 Pro

ruslantalpa commented 5 years ago

try subzero-base-project

ruslantalpa commented 5 years ago

this is a problem in a upstream package. for some reason I thought it was fixed but it seems not, i'll bring the notice back basically it means on win instead of subzero command you do subzero-command

ElixirMike commented 5 years ago

That was it...worked with subzero-base-project. Thx!

ElixirMike commented 5 years ago

Another quick question...the stack is up and running, but when I run the test call curl http://localhost:8080/rest/todos?select=id,todo

I get a "permission denied". I'm assuming that's because the anonymous role wasn't granted privileges to the todos view?

In terms of setup, is there an additional script I should run in the db to grant privs? -UPDATE: only happens if I call http://localhost:8080/rest/todos directly ..(this is how I was testing when just trying postgrest). It works if I add the ?select ...must be part of the permission of the view

ruslantalpa commented 5 years ago

No select means select * which means you are requesting the private, mine columns and for those particilar columns anonymous user does not have rights