cozy / cozy-browser-sdk

Cozy Data System client for the browser
http://dev.cozy.io
MIT License
7 stars 12 forks source link

node_module maybe not complet #25

Open jojorb opened 8 years ago

jojorb commented 8 years ago

hi, after a npm i cozysdk-client -- save ("cozysdk-client": "0.0.5") i use CommonJS and so i need to do into app.js var cozysdk = require('../vendor/cozysdk-client');

an npm build return this error: Error: Cannot find module './utils/client' from '/myproject/vendor' Error: Cannot find module './utils/client' from '/stuff/myproject/node_modules/cozysdk-client/dist'

ls /node_modules/cozysdk/

ls /node_modules/cozysdk-client/dist

with the https://cdn.rawgit.com/cozy/cozy-browser-sdk/wip-v1/dist/cozysdk-client.js everything was fine https://github.com/cozy/cozy-browser-sdk/blob/master/dist/cozysdk-client.js#L5

So maybe it miss the ./utils folder into the npm version?

jojorb commented 8 years ago

sorry for the several edit

clochix commented 8 years ago

@aenario any thought?

jojorb commented 8 years ago

just to add more test with require...

cozysdk = require('../vendor/cozysdk-client.js');

"start": "node_modules/.bin/watchify src/app.js -o ./build/map.min.js -v -d .", npm run start with the last version of today

$ npm run start 
...

Error: Cannot find module './utils/client' from '/home/.......'
Error: Cannot find module './utils/promiser' 
Error: Cannot find module './utils/client' 
Error: Cannot find module './utils/promiser' 
Error: Cannot find module './crud' 
Error: Cannot find module './binaries' 
Error: Cannot find module './requests' 
Error: Cannot find module './utils/client' 
Error: Cannot find module './utils/promiser'