Skip to content
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

Exception in file read #225

Open
neerajkumaragarwal1990 opened this issue Dec 9, 2014 · 9 comments
Open

Exception in file read #225

neerajkumaragarwal1990 opened this issue Dec 9, 2014 · 9 comments

Comments

@neerajkumaragarwal1990
Copy link

On mac, when I do npm start, I get this error.

File /Users/abc/projects/iodocs/config.json not found or is invalid. Try: cp config.json.sample config.json

I tried printing the exception, it says
[TypeError: Property 'minify' of object # is not a function]

I did npm install properly, I tried installing the node-json-minify manually as well, but still doesn't work.
I tried using https://github.com/getify/JSON.minify on node command line as well, but it doesn't work as well. Should I try some other version of node-json-minify? It is set to 0.1.x right now in package.json

@phairow
Copy link
Contributor

phairow commented Dec 10, 2014

I haven't seen this one before. If you have created the config.json file then this error should go away. Might be a permission issue so check that too. Also, make sure you installed all the dependencies including redis.

@neerajkumaragarwal1990
Copy link
Author

I am able to read the file and print it in the same code. The only problem is the 'minify' module it seems.

@rubyisbeautiful
Copy link

I am getting this as well on Mac OS X 10.10.1. I am not very learned with node and npm. I cloned the repo, followed the directions in the README (npm install; cp config.json), and get the same error:

$ npm start

> iodocs@0.0.1 start /Users/bryan/apps/iodocs
> supervisor -e 'js|json' app


Running node-supervisor with
  program 'app'
  --watch '.'
  --extensions 'js|json'
  --exec 'node'

Starting child process with 'node app'
Watching directory '/Users/bryan/apps/iodocs' for changes.
File /Users/bryan/apps/iodocs/config.json not found or is invalid.  Try: `cp config.json.sample config.json`
Program node app exited with code 1

Here are my dependency versions:

iodocs$ node --version
v0.10.33
iodocs$ npm --version
2.1.11
iodocs$ redis-server --version
Redis server v=2.8.17 sha=00000000:0 malloc=libc bits=64 build=97eed77a40720341
iodocs$ redis-cli --version
redis-cli 2.8.17


I also attempted a clean install and run on Ubuntu 14.04 (via Docker), and it worked perfectly:

root@ffec822bc959:/iodocs# node --version
v0.10.33
root@ffec822bc959:
/iodocs# npm --version
1.4.28



Is there anything else I can provide that would be helpful?  Thank you

@ArVan
Copy link

ArVan commented Dec 24, 2014

It is a bug in node-json-minify module. The version 0.1.1 has a bug in it. Unfortunately their versioning is made so, that the dependency in iodocs can't get a newer version of it.
This can be fixed by changing the version in package.json to "node-json-minify": ">= 0.1.3-a",. This will install a newer version of minify.

@neerajkumaragarwal1990
Copy link
Author

@ArVan That solves it!

@amilkr
Copy link

amilkr commented Jan 16, 2015

It should be fixed.

@chipironcin
Copy link

It is still not fixed. Is there anyone managing the repo? Maybe a line in FAQ or warning in README.md will do the trick for new installs.

@nnoco
Copy link

nnoco commented Apr 30, 2015

@chipironcin Did you run "npm install" after to modify config.json?

@nnoco
Copy link

nnoco commented Apr 30, 2015

@ArVan Thank you! That solves it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants