jsguy/misojs

miso todo template includes non-installed custom adapters

efuquen opened this issue · 2 comments

If you create an app using the todo template as specified in the docs and then run it, like so:

miso -n myApp -s todo
miso run

You will get the following error:

Error: Cannot find module '../adaptor/flickr/flickr.adaptor.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at module.exports (/Users/efuquen/Code/adsmart/adsmart-js/myApp/system/adaptor/api.js:19:15)
    at /Users/efuquen/Code/adsmart/adsmart-js/myApp/system/index.js:119:43
    at /Users/efuquen/Code/adsmart/adsmart-js/myApp/node_modules/lodash/index.js:3053:15
    at baseForOwn (/Users/efuquen/Code/adsmart/adsmart-js/myApp/node_modules/lodash/index.js:2058:14)
    at Function.<anonymous> (/Users/efuquen/Code/adsmart/adsmart-js/myApp/node_modules/lodash/index.js:3332:16)
    at module.exports (/Users/efuquen/Code/adsmart/adsmart-js/myApp/system/index.js:105:5)

If you look at cfg/server.development.json in the project it includes an array of adaptor, which has two custom adaptors that aren't installed with the todo template, "flickr" and "authentication". If you remove these the app will run. Looks like the template needs to include these libraries or simply not have these custom adaptors specified, not sure which was intended.

This is with miso version 0.16.

This is now fixed in trunk - though I haven't cut release 0.17 yet - I need to complete a few things first - will be fixed soon.

For now, removing those from the server config is the correct way to fix it.

Ok, fixed in 0.18, please upgrade to it and it should work.