tools: Polymer build fails silently with "bundle": true in polymer.json

Description

Polymer does not build if the option “bundle” : true is specified in polymer.json

Unbundled builds remain OK. But bundled builds fail silently (ex: “bundle”: true or “preset”: “es6-bundled”)

Versions & Environment

  • Operating System: Win 7 x64 (Windows seven 64 bits)
C:\Program Files\nodejs\otority>node --version
v8.1.2

C:\Program Files\nodejs\otority>npm --version
5.0.3

C:\Program Files\nodejs\otority>polymer --version
1.3.1

Steps to Reproduce

A simple polymer.json with “bundle”: true in the build section

{
  "name": "Otority",
  "entrypoint": "public/index.html",
  "shell": "public/src/my-app/my-app.html",
  "fragments": [
    "public/src/my-contact-list/my-contact-list.html",
    "public/src/my-contact-get/my-contact-get.html",
    "public/src/my-contact-set/my-contact-set.html",
    "public/src/my-tractage/my-tractage.html",
    "public/src/my-collage/my-collage.html"
  ],
  "sources": [
    "public/**/*",
    "public/fonts/**/*",
    "public/js/**/*",
    "public/images/**/*",
    "bower.json"
  ],
  "extraDependencies": [
  	"public/manifest.json",
  	"public/firebase-messaging-sw.js",
  	"public/bower_components/webcomponentsjs/webcomponents-lite.js"
  ],
  "lint": {
    "rules": ["polymer-2-hybrid"],
    "ignoreWarnings": []
  },
  "builds": [
    {
      "name": "bundled",
      "bundle": true
    }
  ]
}

Expected Results

C:\Program Files\nodejs\otority>polymer build
info:    Clearing build\ directory...
info:    (bundled) Building...

C:\Program Files\nodejs\otority>

=> A bundled version is created

Actual Results

C:\Program Files\nodejs\otority>polymer build
info:    Clearing build\ directory...

C:\Program Files\nodejs\otority>

=> no bundled version created

You might observe that actual results do not show the line : “info: (bundled) Building…”, meaning something goes wrong.

Here is the verbose stuff :

C:\Program Files\nodejs\otority>polymer build --verbose
debug:   got args:
{ args: [ 'build', '--verbose' ] }
debug:   got default config from polymer.json file:
{ config:
   { name: 'Otority',
     entrypoint: 'public/index.html',
     shell: 'public/src/my-app/my-app.html',
     fragments:
      [ 'public/src/my-contact-list/my-contact-list.html',
        'public/src/my-contact-get/my-contact-get.html',
        'public/src/my-contact-set/my-contact-set.html',
        'public/src/my-tractage/my-tractage.html',
        'public/src/my-collage/my-collage.html' ],
     sources:
      [ 'public/**/*',
        'public/fonts/**/*',
        'public/js/**/*',
        'public/images/**/*',
        'bower.json' ],
     extraDependencies:
      [ 'public/manifest.json',
        'public/firebase-messaging-sw.js',
        'public/bower_components/webcomponentsjs/webcomponents-lite.js' ],
     lint: { rules: [ 'polymer-2-hybrid' ], ignoreWarnings: [] },
     builds: [ { name: 'bundled', bundle: true } ] } }
debug:   adding command analyze
debug:   adding command build
debug:   adding command help
debug:   adding command init
debug:   adding command install
debug:   adding command lint
debug:   adding command serve
debug:   adding command test
debug:   running...
debug:   command 'build' found, parsing command args:
{ args: [ '--verbose' ] }
debug:   command options parsed from args:
{ verbose: true }
debug:   final project configuration generated:
{ lint: { rules: [ 'polymer-2-hybrid' ], ignoreWarnings: [] },
  root: 'C:\\Program Files\\nodejs\\otority',
  entrypoint: 'C:\\Program Files\\nodejs\\otority\\public\\index.html',
  shell: 'C:\\Program Files\\nodejs\\otority\\public\\src\\my-app\\my-app.html',
  fragments:
   [ 'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-list\\my-contact-list.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-get\\my-contact-get.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-set\\my-contact-set.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-tractage\\my-tractage.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-collage\\my-collage.html' ],
  extraDependencies:
   [ 'C:\\Program Files\\nodejs\\otority\\public\\manifest.json',
     'C:\\Program Files\\nodejs\\otority\\public\\firebase-messaging-sw.js',
     'C:\\Program Files\\nodejs\\otority\\public\\bower_components\\webcomponentsjs\\webcomponents-lite.js',
     'C:\\Program Files\\nodejs\\otority\\bower_components\\webcomponentsjs\\*.js' ],
  sources:
   [ 'C:\\Program Files\\nodejs\\otority\\public\\**\\*',
     'C:\\Program Files\\nodejs\\otority\\public\\fonts\\**\\*',
     'C:\\Program Files\\nodejs\\otority\\public\\js\\**\\*',
     'C:\\Program Files\\nodejs\\otority\\public\\images\\**\\*',
     'C:\\Program Files\\nodejs\\otority\\bower.json',
     'C:\\Program Files\\nodejs\\otority\\public\\index.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-app\\my-app.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-list\\my-contact-list.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-get\\my-contact-get.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-set\\my-contact-set.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-tractage\\my-tractage.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-collage\\my-collage.html' ],
  allFragments:
   [ 'C:\\Program Files\\nodejs\\otority\\public\\src\\my-app\\my-app.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-list\\my-contact-list.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-get\\my-contact-get.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-contact-set\\my-contact-set.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-tractage\\my-tractage.html',
     'C:\\Program Files\\nodejs\\otority\\public\\src\\my-collage\\my-collage.html' ],
  builds: [ { name: 'bundled', bundle: true } ] }
debug:   Running command...
info:    Clearing build\ directory...
debug:   "build\bundled": Building with options:
{ name: 'bundled', bundle: true }

C:\Program Files\nodejs\otority>

=> and again, no bundled version created

Next steps ?

Tell me if you need the app code to debug.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 23 (8 by maintainers)

Most upvoted comments

This happens to me when I have an HTML import that isn’t resolving (missing html file, etc.) Could that be the case?

I’m having the same issue on windows 10 wsl Ubuntu. With one .html file and one .js file less than 400 lines together. I can share if it would be helpful for reproducing and fixing the bug.