Skip to content

Creating an app with the default template throws an error #365

@nephix

Description

@nephix

When I build an app with the default template from https://github.com/developit/preact-cli/blob/master/src/resources/template.html I get an error message.

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

Build failed!

Template execution failed: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
  TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
  
  - template.html:15 module.exports
    [..]/[ejs-loader]/index.js!./template.html:15:25
  
  - index.js:264 
    [global]/[html-webpack-plugin]/index.js:264:16
  
  - util.js:16 tryCatcher
    [global]/[html-webpack-plugin]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [global]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [global]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:606 Promise._settlePromiseCtx
    [global]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:606:10
  
  - async.js:138 Async._drainQueue
    [global]/[html-webpack-plugin]/[bluebird]/js/release/async.js:138:12
  
  - async.js:143 Async._drainQueues
    [global]/[html-webpack-plugin]/[bluebird]/js/release/async.js:143:10
  
  - async.js:17 Immediate.Async.drainQueues
    [global]/[html-webpack-plugin]/[bluebird]/js/release/async.js:17:14

If the current behavior is a bug, please provide the steps to reproduce.

  1. preact create TestApp
  2. Copy content of https://github.com/developit/preact-cli/blob/master/src/resources/template.html into TestApp/src/template.html
  3. Run preact watch --template src/template.html or preact build.
    When I run npm run build the app builds successfully.

What is the expected behavior?
The app is built successfully with the default template. I can also add new header scripts to the template like e.g. Google Tag Manager.

Please mention other relevant information.

  • node version: 6.11.1
  • npm version: 5.3.0
  • Operating system: MacOS
  • preact-cli: 1.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions