Closed charyorde closed 9 years ago
Same error after upgrade: to node v0.10.33 and npm v2.1.11
Executing the test, gives similar errors:
1) pg-json-schema-export #toJSON should return an object:
Error: ENOENT, no such file or directory 'build/postbooks_demo_460.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
at Context.<anonymous> (/Users/charyorde/projects/nodescripts/node_modules/pg-json-schema-export/test.js:29:10)
at callFn (/usr/local/lib/node_modules/mocha/lib/runnable.js:250:21)
at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:243:7)
at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:373:10)
at /usr/local/lib/node_modules/mocha/lib/runner.js:451:12
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:298:14)
at /usr/local/lib/node_modules/mocha/lib/runner.js:308:7
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:345:15)
Error: ENOENT, no such file or directory './sql/views.sql'
I'm not sure how you'd be missing this file. It's right here: https://github.com/tjwebb/pg-json-schema-export/blob/master/sql/views.sql
The build also passes: https://travis-ci.org/tjwebb/pg-json-schema-export/jobs/33048371. So I'm not quite sure what's going on.
any update?
I did a number of workarounds to get this working. I can't remember much of it any longer though. But one of it should be installing locally instead of globally.
Yea... installing npm packages globally usually isn't going to work. It'd be nice in the future if you'd report the issues instead of silently hacking together workarounds that no one else can use.
Like I said, in the future, file issues before implementing random hacks to make stuff work. On Jan 27, 2015 8:26 AM, "charyorde" notifications@github.com wrote:
Closed #5 https://github.com/tjwebb/pg-json-schema-export/issues/5.
— Reply to this email directly or view it on GitHub https://github.com/tjwebb/pg-json-schema-export/issues/5#event-225347661 .
Hi,
Node couldn't load views.sql file within the sql directory.
Here's the console error log below:
Env: