Uncaught TypeError: Cannot read property 'position' of undefined

cc.Class({
    extends: cc.Component,

    properties: {


        bj: {
            default: null,
            type: cc.Node
        }



    },

    // LIFE-CYCLE CALLBACKS:

     onLoad () {
    


       cc.log(this.bj.node.position.x);


    
    },

一直提示 Uncaught TypeError: Cannot read property ‘position’ of undefined

为什么呢 头疼一晚上了。

建议使用 ts ,可以减少这种比较低级的错误。

this.bj.node.position.x 改为 this.bj.position.x

谢谢大佬 终于解决了 新版原来不需要node