spring-attic / sagan

The spring.io site and reference application
http://spring.io
BSD 3-Clause "New" or "Revised" License
3.13k stars 1.51k forks source link

Build fails with node.js v0.12 #506

Closed ufoscout closed 8 years ago

ufoscout commented 9 years ago

It is not possible to build the master on linux (Mint 17.1). The builds fails at the :sagan-client:npmBuild step. If I execute "gulp build" into the sagan-client folder this is the output:

[12:05:36] Using gulpfile ~/workspaces/github_ufoscout/sagan/sagan-client/gulpfile.js
[12:05:36] Starting 'minify-css'...
[12:05:36] Starting 'build-modules'...
[12:05:36] Starting 'copy-assets'...
[12:05:36] Starting 'bower-files'...
/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1249
                                        if (rejected) rejected(ex); else throw ex;
                                                                               ^
Error: Multiple anonymous defines encountered
    at /home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:963:19
    at loadScriptViaRequire (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1575:4)
    at Object.priv.core.loadScript (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1556:11)
    at Object.core.fetchResDef (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:951:9)
    at Object.core.fetchDep (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1036:10)
    at getDep (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:906:21)
    at Object.core.getDeps (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:888:6)
    at /home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1267:38
    at when (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:219:11)
    at /home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-cram/node_modules/cram/amd_modules/curl/dist/curl-for-ssjs/curl.js:1267:5

If I do "npm update" and then "gulp build" again, the output is different but always failing:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error
    at new JS_Parse_Error (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:189:18)
    at js_error (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:197:11)
    at parse_error (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:299:55)
    at Object.next_token [as input] (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:544:9)
    at next (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:643:25)
    at Object.parse (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js:629:15)
    at /home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:80:33
    at Array.forEach (native)
    at Object.exports.minify (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:75:15)
    at Transform.minify [as _transform] (/home/ufo/workspaces/github_ufoscout/sagan/sagan-client/node_modules/gulp-uglify/index.js:51:21)

I'm using node 0.12:

$ node --version
v0.12.0
$ npm --version
2.5.1
bclozel commented 9 years ago

Hi,

The build currently fails with node v0.12 - v0.10 works fine. I'm updating the issue title to reflect that.

bclozel commented 9 years ago

Should be fixed by #541

bclozel commented 8 years ago

Sagan now builds with Node.js 4.2.2+