使用gulp和uplift-js构建项目时代码失败

时间:2017-09-27 06:20:51

标签: javascript gulp gulp-uglify

我正在使用gulp和uglify-js构建我的项目,但它失败了,无法构建。我无法找到这个小代码片段的问题。

功能:

function getGPSLocation() {
        var unregisterHandler = window.bridge.on('gps_location', (parameters)=> {
            $('#gps_token').html("Longitude: " + parameters.longitude + " <br /> Latitude: " + parameters.latitude)
        })
}

错误:

events.js:160
  throw er; // Unhandled 'error' event

错误日志:

        events.js:160
                throw er; // Unhandled 'error' event
                ^
    Error
            at new JS_Parse_Error (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:1545:18)
            at js_error (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:1553:11)
            at croak (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2092:9)
            at token_error (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2100:9)
            at unexpected (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2106:9)
            at expr_atom (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2633:9)
            at maybe_unary (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2795:19)
            at expr_ops (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2830:24)
            at maybe_conditional (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2835:20)
            at maybe_assign (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2859:20)
            at maybe_assign (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2867:32)
            at expression (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2878:20)
            at expr_list (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2644:24)
            at subscripts (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2778:30)
            at subscripts (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2755:20)
            at subscripts (eval at <anonymous> (/Users/erik/Desktop/Erik/code/nat5/node_modules/uglify-js/tools/node.js:1:0), <anonymous>:2755:20)
    Eriks-MacBook-Pro:nat5 erik$

0 个答案:

没有答案