首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gulp Cordova build android error - node_modules -gulp jscs- index.js:99 :- RangeError:无效的字符串长度

Gulp Cordova build android error - node_modules -gulp jscs- index.js:99 :- RangeError:无效的字符串长度
EN

Stack Overflow用户
提问于 2016-02-16 12:41:24
回答 1查看 75关注 0票数 0
代码语言:javascript
复制
this.emit('error', new gutil.PluginError('gulp-jscs', out.join('\n\n'), {

  ^

RangeError:字符串长度无效

代码语言:javascript
复制
 at Array.join (native)
    at DestroyableTransform._flush (C:\ABC\node_modules\gulp-jscs\index.j
s:99:62)
    at DestroyableTransform.<anonymous> (C:\ABC\node_modules\gulp-jscs\no
de_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:135:12
)
EN

回答 1

Stack Overflow用户

发布于 2016-02-16 12:59:08

添加try & catch块函数, (cb) {

代码语言:javascript
复制
    if (out.length > 0) {
        try {
            console.log('out is: ', out[1]);
            this.emit('error', new gutil.PluginError('gulp-jscs', out.join('\n\n'), {
                showStack: false
            }));
        } catch (e) {
            console.log('exception: ', e);
        }
    }

    cb();
})
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35423905

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档