求教:控制台报错。TypeError: component._destroyImmediate is not a function

TypeError: component._destroyImmediate is not a function
at cc_Node._onPreDestroy [as _onPreDestroyBase] (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:700:31)
at cc_Node._onPreDestroy (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCNode.js:649:44)
at cc_Node.prototype._destroyImmediate (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\platform\CCObject.js:230:22)
at cc_Node._onPreDestroy [as _onPreDestroyBase] (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:696:33)
at cc_Node._onPreDestroy (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCNode.js:649:44)
at cc_Node.prototype._destroyImmediate (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\platform\CCObject.js:230:22)
at cc_Node._onPreDestroy [as _onPreDestroyBase] (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:696:33)
at cc_Node._onPreDestroy (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCNode.js:649:44)
at cc_Node.prototype._destroyImmediate (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\platform\CCObject.js:230:22)
at cc_Node._onPreDestroy [as _onPreDestroyBase] (D:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:696:33)

2.0.6版本

这个BUG在本地调试时不会发生但是打包之后才有,可以检查一下模块设置是不是漏了什么模块,我的是在一个active=false的节点上加了一个没有勾上的模块的组件,在切换场景时发生错误

我也遇到了这个问题,参照楼上的老兄的办法,在 项目->项目设置->模块设置中,发现widget没勾选,项目里用到了,勾选上再重新build就好了