heroku / heroku-buildpack-emberjs

**This buildpack is deprecated!** Please use the official Node.js buildpack combined with the static or nginx buildpack instead.
71 stars 28 forks source link

The Broccoli Plugin: [UglifyWriter] failed #33

Closed mpugach closed 7 years ago

mpugach commented 7 years ago

Hi

I have an issue deploying an application

git push git@heroku.com:mymegaapp-staging-spa.git `git subtree split --prefix mymegaapp-spa master`:refs/heads/master --force 
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.87 KiB | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> emberjs app detected
remote: -----> Fetching buildpack heroku/nodejs-v98
remote: -----> Node.js detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=false
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  7.9.0
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Downloading and installing node 7.9.0...
remote:        Using default npm version: 4.2.0
remote:        Resolving yarn version (latest) via semver.io...
remote:        Downloading and installing yarn (0.23.4)...
remote:        Installed yarn 0.23.4
remote: 
remote: -----> Restoring cache
remote:        Skipping cache restore (new runtime signature)
remote: 
remote: -----> Building dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v0.23.4
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
remote:        info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        Done in 65.70s.
remote: 
remote: -----> Caching build
remote:        Clearing previous node cache
remote:        Saving 2 cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (nothing to cache)
remote: 
remote: -----> Build succeeded!
remote: -----> Fetching buildpack heroku/ember-cli-deploy
remote: -----> ember-cli detected
remote: -----> Installing bower
remote: /tmp/build_c6fd641591ea91d0e7afd01553e61e86/.heroku/node/bin/bower -> /tmp/build_c6fd641591ea91d0e7afd01553e61e86/.heroku/node/lib/node_modules/bower/bin/bower
remote: /tmp/build_c6fd641591ea91d0e7afd01553e61e86/.heroku/node/lib
remote: └── bower@1.8.0 
remote: 
remote: -----> Installing bower dependencies
remote: bower swiper#~3.4.1         not-cached https://github.com/nolimits4web/Swiper.git#~3.4.1
remote: bower swiper#~3.4.1            resolve https://github.com/nolimits4web/Swiper.git#~3.4.1
remote: bower toastr#^2.1.3         not-cached https://github.com/johnpapa/toastr-bower.git#^2.1.3
remote: bower toastr#^2.1.3            resolve https://github.com/johnpapa/toastr-bower.git#^2.1.3
remote: bower toastr#^2.1.3           download https://github.com/johnpapa/toastr-bower/archive/2.1.3.tar.gz
remote: bower swiper#~3.4.1           download https://github.com/nolimits4web/Swiper/archive/v3.4.2.tar.gz
remote: bower toastr#^2.1.3            extract archive.tar.gz
remote: bower swiper#~3.4.1            extract archive.tar.gz
remote: bower toastr#^2.1.3           resolved https://github.com/johnpapa/toastr-bower.git#2.1.3
remote: bower jquery#>=1.6.3 <3     not-cached https://github.com/jquery/jquery-dist.git#>=1.6.3 <3
remote: bower jquery#>=1.6.3 <3        resolve https://github.com/jquery/jquery-dist.git#>=1.6.3 <3
remote: bower jquery#>=1.6.3 <3       download https://github.com/jquery/jquery-dist/archive/2.2.4.tar.gz
remote: bower jquery#>=1.6.3 <3        extract archive.tar.gz
remote: bower swiper#~3.4.1           resolved https://github.com/nolimits4web/Swiper.git#3.4.2
remote: bower jquery#>=1.6.3 <3       resolved https://github.com/jquery/jquery-dist.git#2.2.4
remote: bower toastr#^2.1.3            install toastr#2.1.3
remote: bower swiper#~3.4.1            install swiper#3.4.2
remote: bower jquery#>=1.6.3 <3        install jquery#2.2.4
remote: 
remote: toastr#2.1.3 bower_components/toastr
remote: └── jquery#2.2.4
remote: 
remote: swiper#3.4.2 bower_components/swiper
remote: 
remote: jquery#2.2.4 bower_components/jquery
remote: -----> Caching bower cache
remote: -----> Building ember assets
remote: Could not start watchman
remote: Visit https://ember-cli.com/user-guide/#watchman for more info.
remote: cleaning up...
remote: Build failed.
remote: File: assets/mymegaapp-spa.js (13:6)
remote: The Broccoli Plugin: [UglifyWriter] failed with:
remote: SyntaxError: The Broccoli Plugin: [UglifyWriter] failed with:
remote:     at JS_Parse_Error.get (eval at <anonymous> (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/uglify-js/tools/node.js:27:1), <anonymous>:86:23)
remote:     at writeError (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/console-ui/lib/write-error.js:23:23)
remote:     at UI.writeError (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/console-ui/lib/index.js:159:3)
remote:     at CLI.logError (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/ember-cli/lib/cli/cli.js:273:13)
remote:     at tryCatch (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/rsvp/dist/rsvp.js:539:12)
remote:     at invokeCallback (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/rsvp/dist/rsvp.js:554:13)
remote:     at publisError running: ember build --environment production 2>&1
remote: h (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/rsvp/dist/rsvp.js:522:7)
remote:     at publishRejection (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/rsvp/dist/rsvp.js:457:3)
remote:     at flush (/tmp/build_c6fd641591ea91d0e7afd01553e61e86/node_modules/rsvp/dist/rsvp.js:2414:5)
remote:     at _combinedTickCallback (internal/process/next_tick.js:73:7)
remote: -----> Failed trying to compile heroku/ember-cli-deploy
remote:  !     Push rejected, failed to compile emberjs app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: ! Push rejected to mymegaapp-staging-spa.
remote: 

here is the package.json

{
  "name": "mymegaapp-spa",
  "version": "0.0.0",
  "description": "Small description for mymegaapp-spa goes here",
  "license": "MIT",
  "author": "",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "repository": "",
  "scripts": {
    "build": "ember build",
    "start": "ember server --proxy http://localhost:3000",
    "test": "ember test"
  },
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^3.0.0",
    "ember-cli": "2.13.0",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-autoprefixer": "^0.7.0",
    "ember-cli-babel": "^6.0.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-htmlbars": "^1.1.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.0",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-qunit": "^4.0.0-beta.1",
    "ember-cli-sass": "^6.1.3",
    "ember-cli-sass-pods": "^1.3.0",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-swiper": "^0.6.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "^2.13.0",
    "ember-export-application-global": "^2.0.0",
    "ember-inline-svg": "^0.1.11",
    "ember-load-initializers": "^1.0.0",
    "ember-normalize": "^1.0.0",
    "ember-resolver": "^4.0.0",
    "ember-simple-auth": "^1.2.2",
    "ember-source": "~2.13.0",
    "ember-toastr": "^1.5.0",
    "loader.js": "^4.2.3",
    "normalize.css": "~4.1.1"
  },
  "engines": {
    "node": "7.9.0"
  },
  "private": true
}

and yarn.lock attached yarn.lock.zip

How to debug and fix it?

Dhaulagiri commented 7 years ago

does ember b -p succeed locally?

mpugach commented 7 years ago

No, but thank you for -p now I can debug it locally :)

Dhaulagiri commented 7 years ago

no problem, i'm going to close this as it is likely not an issue with this buildpack but feel free to re-open or paste the eventual solution here in case it might be helpful to others

mpugach commented 7 years ago

fixed

The issue appeared because I removed ie 9 from config/targets.js