Web deployment error [Solved]

Hi, my game works before compiling.

But after compiling using the “cocos compile -p web -m release”

I moved this files to my www directory of my apache server and it shows this console error in google chrome:
"Uncaught TypeError: Cannot read property ‘getActionManager’ of undefined. game.min.js:312".

When i use the --advanced parameter in the compiling the ‘getActionManager’ from the console message, it changes for ‘EX’.

I also tried to override the framework folder in my project for the one of the template. In case I changed something there.

I uploaded the game to itch.io and the console shows the same error.

Edit. The error in mozilla, its the same line but it gives more info.

I traced the error, deminifying the code, etc. I found that I cant initialize cc.node classes in the declaration then of compiling process. I imagine thats something of the jsb because before do it, the game worked.

E.g.
var someRandomClass=cc.Sprite.extend({ someNestedSprite: cc.Sprite.create(xx), //<-- error after compiling otherNestedSprite:null, ctor:function () { this._super(); this.otherNestedSprite=cc.Sprite.create(xx); //<-- Now yes! }, }