Getting error on imposter file

266 views
Skip to first unread message

varun rajasekar

unread,
Nov 9, 2017, 3:16:11 PM11/9/17
to mountebank-discuss
Hi All,
I just started using mounteBank and i am getting this error

/usr/local/lib/node_modules/mountebank/node_modules/q/q.js:155

                throw e;

                ^


Error: Could not find include include file.

    at getIncludePath (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:152:13)

    at includeSource (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:276:17)

    at /usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:629:26

    at Array.forEach (<anonymous>)

    at Template.generateSource (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:605:15)

    at Template.compile (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:509:12)

    at Object.compile (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:358:16)

    at handleCache (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:201:18)

    at Object.exports.render (/usr/local/lib/node_modules/mountebank/node_modules/ejs/lib/ejs.js:384:10)

    at loadConfig (/usr/local/lib/node_modules/mountebank/bin/mb:136:65)



My imposter file is


{

        "imposters": [{

                "port": 4547,

                "protocol": "http",

                "stubs": [{

                                <% include MockResponseForApiOne.json %>

                        },

                        {

                                <% include MockResponseForApiTwo.json %>

                        }

                ]

        }]

}


I am following the example which is listed in the below 

http://abygeorgea.com/blog/2017/03/03/mountebank-your-first-service-virtualisation/


And another error which i get is 

m-c02vc0mwhtdg:mountebank vrajas1$ mb --configfile test.json

info: [mb:2525] mountebank v1.13.0 now taking orders - point your browser to http://localhost:2525 for help

No such file: test.json


Any help on this will be highly appreciated.


Thanks,

Varun

Linda Goldstein

unread,
Nov 13, 2017, 3:20:23 PM11/13/17
to varun rajasekar, mountebank-discuss
Hey Varun, it looks like the filename or pathname of your imposters is not quite matching up. If this is still an issue, maybe take a look at the relative positions of these files on your filesystem. 

--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Linda Goldstein
Senior Consultant Developer, ThoughtWorks
Reply all
Reply to author
Forward
0 new messages