How to add cc.RenderTexture to scene?

var ss = new cc.RenderTexture(512, 512);

    ss.beginWithClear(255, 0, 0, 255);
        // gRenderLayer.visit();
    ss.end();

    ss.setPosition( (Math.random() - 0.5)*1000, (Math.random() - 0.5)*1000);
    var node = cc.find('Canvas')
    node.addChild(ss, 200, "");

I can’t add RenderTexture object to node, I’m getting this error:
The child to add must be instance of cc.Node, not TheClass.

RenderTexture object is a TheClass. Also I can’t create cc.Layer in CocosCreator

Did you manage to make it work?
I’m with a similar problem, where it says that my class is of type TheClass when it is clearly a subclass of Node

     const drawer = new cc.DrawNode()
     drawer.drawCircle(cc.p(0,0), 50, 0, 50, false, 5, cc.color.BLACK)
     drawer.drawDot(cc.p(200,200), 200, cc.color.BLACK)
     this.node.addChild(drawer)