Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20940

Fix Salesforce Web "Unhandled 'error' event" build error with Node.js 6.5

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10-SNAPSHOT
    • Fix Version/s: 9.1
    • Component/s: Salesforce

      Description

      The salesforce-web module build fails with the following:

      node: 6.5.0
      npm: 3.10.3

      build-with-tests:
           [echo] build and test
           [exec] (node:5959) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
           [exec] [15:39:32] Using gulpfile ~/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/gulpfile.js
           [exec] [15:39:32] Starting 'clean'...
           [exec] [15:39:32] Finished 'clean' after 11 ms
           [exec] [15:39:32] Starting 'default'...
           [exec] [15:39:32] Starting 'copy'...
           [exec] [15:39:32] Starting 'styles'...
           [exec] [15:39:33] styles all files 901 B
           [exec] [15:39:33] Finished 'styles' after 667 ms
           [exec] [15:39:34] copy all files 13.16 MB
           [exec] [15:39:34] Finished 'copy' after 1.5 s
           [exec] [15:39:34] Starting 'elements'...
           [exec] [15:39:34] Finished 'elements' after 5.45 ms
           [exec] [15:39:34] Starting 'images'...
           [exec] [15:39:34] Starting 'fonts'...
           [exec] [15:39:34] Starting 'html'...
           [exec] (node:5959) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
           [exec] [15:39:34] Starting 'compress'...
           [exec] [15:39:34] Finished 'fonts' after 295 ms
           [exec] [15:39:34] gulp-cssmin: Skipping unsupported css scripts/vendor/json2.js
           [exec] [15:39:34] gulp-cssmin: Skipping unsupported css scripts/app.js
           [exec] 
           [exec] events.js:160
           [exec]       throw er; // Unhandled 'error' event
           [exec]       ^
           [exec] Error
           [exec]     at new JS_Parse_Error (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1526:18)
           [exec]     at js_error (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1534:11)
           [exec]     at croak (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2025:9)
           [exec]     at token_error (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2033:9)
           [exec]     at unexpected (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2039:9)
           [exec]     at semicolon (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2059:43)
           [exec]     at simple_statement (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2239:73)
           [exec]     at eval (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2112:19)
           [exec]     at eval (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2072:24)
           [exec]     at eval (eval at <anonymous> (/home/anahide/ws/nuxeo-new/addons/nuxeo-salesforce/nuxeo-salesforce-web/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2819:23)
           [exec] [15:39:35] gulp-cssmin: Skipping unsupported css bower_components/webcomponentsjs/webcomponents-lite.min.js
           [exec] [15:39:35] Finished 'compress' after 682 ms
      

      Downgrading to node 4.5.0 (and npm 2.15.9) fixes the issue

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.