convertToCvBGR() should work with any of the pixel formats supported by our sensor, including RGBP and BAYER.
Your error is coming from require() which is probably in your top-level module code, just before you do the conversion. require() is used to enforce that the camera (or USB output) format has some specific specs so that the module code does not have to be too complex. For example, often we only support YUYV so that we can use the drawing functions that only work with YUYV.
Indeed, have a look at the image format conversion module at
http://jevois.org/doc/ModuleTutorial.html
That one works with all possible camera pixel types. It has no require() call on the inimg. See require() here for more info:
http://jevois.org/doc/RawImage_8H_source.html