heapwolf/levelui

error when using level-sublevel

oren opened this issue · 3 comments

oren commented

trying to run levelweb when using level-sublevel throws the following error:

events.js:72
throw er; // Unhandled 'error' event EncodingError: Unexpected token ÿ
at ReadStream._onData (/usr/local/lib/node_modules/levelweb/node_modules/levelup/lib/read-stream.js:136:31)

it might be related to JSON.parse a utf8 string with \xff at the front.

i think you are right, i'll take a look. can you post a gist or link me to some code? also, the parameters you are using to start levelweb?

I had this issue with lev too, we'll need to port over the recent changes made to lev.

oren commented

steps to reproduce:
git clone git@github.com:oren/groups.git
cd groups
npm install
node db/seed/seed.js
npm install levelweb -g
levelweb -u admin -p password
levelweb ./groupsDB
access this url: https://localhost:8080