Closed yaronyg closed 8 years ago
David owes a clean repro to Oguz et al.
There is a leveldown module that comes bundled with pouchdb - it appears we are using a duplicate in node_modules
@yaronyg - leveldown module duplicated in:
www/jxcore/node_modules/leveldown
and
www/jxcore/node_modules/pouchdb/node_modules/leveldown
We need to delete the duplicate - Reference to solution: https://github.com/jxcore/jxcore/issues/597
Also for testing in desktop do I strictly need to use jx app.js
or is it okay to use npm app.js
in this localhost dev case?
https://github.com/thaliproject/postcardapp/blob/master/www/jxcore/package.json directly specifies leveldown 1.3.0 but it also specifies pouchdb 3.6.0. Now pouchDB 3.6.0 specifies leveldown as a dependency (see https://github.com/pouchdb/pouchdb/blob/849fd7ae440824c46d3219c90dea4e49caf08693/package.json) but it uses version 0.10.2.
That is why you end up with two different versions of leveldown.
But the real question is - why does this matter? Do we know that the two versions are conflicting?
If so there are several options:
Option 1 - Change postcard's package.json to use leveldown version 0.10.2 Option 2 - Change postcard's package.json to use leveldown version 1.4.1 and then change the pouchDB version to 5.0.0 which uses leveldown version 1.4.1.
I'd prefer option 2 but that is just me.
I got it working in localhost by deleting both 'leveldown' locations.
Then doing npm install leveldown
in www/jxcore
dir.
Or if I change the npm start
command to use jx instead of nodemon in package.json
"start": "NODE_ENV=development jx ./app.js"
Then doing jx npm install leveldown
in www/jxcore
dir works in localhost.
@yaronyg option 2 (fixing leveldown versions) works in desktop - but need to copy in the right 'mockmobile.js' into thali module
Please see https://github.com/jxcore/jxcore/issues/597
There is a work around which is to nuke node_modules and re-install with npm instead of 'jx install' but that is not good. We need this fixed.