TypeError: Cannot read property ‘then’ of undefined

  node.js, question

The code is as follows:

Wechat.prototype.uploadMaterial = function(type,material,permanent)
{
    var that = this;
    var form = {};
    var uploadUrl = api.temporary.upload;
    if(permanent)
    {
        uploadUrl = api.permanent.upload;
        //form继承permanent对象
        _.extend(form,permanent);
    }
    if(type === 'pic')
    {
        uploadUrl = api.permanent.uploadNewsPic;
    }else if(type === 'news')//图文
    {
        uploadUrl = api.permanent.uploadNews;
        form = material;
    }else{
        //meterial是一个文件路径
        form.media = fs.createReadStream(material)
    }

    return new Promise(function(resolve,reject){
        that
            .fetchAccessToken()
            .then(function(data){
                var url = uploadUrl 加 'access_token=' 加 data.access_token;
                //不是永久类型,追加type
                if(!permanent)
                {
                    url 加= '&type='加type;
                }else{
                    form.access_token = data.access_token;
                }
                var options = {
                    method:'POST',
                    url : url,
                    json:true
                };
                //图文
                if(type === 'news')
                {
                    options.body = form;
                }else{
                    options.formData = form;
                }
                //对服务器发送请求
                request({method:'POST',url:url,formData:form,json:true}).then(function(response){
                    var _data = response[1];
                    console.log("执行")
                    if(_data) {
                        resolve(_data);
                    }else {
                        throw new Error('Upload meterial fails');
                    }
                })
                .catch(function(err){
                    reject(err);
                })
            })
    });
};

When running, they always report errors when they arrive.
May I know what went wrong with Great God

Are you sure about thisfetchAccessTokenThe method returned aPromiseObject?