Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed on initial setup #275

Closed
lukasholzer opened this issue Jul 31, 2017 · 9 comments
Closed

build failed on initial setup #275

lukasholzer opened this issue Jul 31, 2017 · 9 comments

Comments

@lukasholzer
Copy link

lukasholzer commented Jul 31, 2017

The initial build is failing

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
    [..]/[index.js!..]/[preact-cli]/lib/resources/template.html:15:27
  
  - index.js:264 
    [robert-holzer-frontend]/[html-webpack-plugin]/index.js:264:16
  
  - util.js:16 tryCatcher
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:606 Promise._settlePromiseCtx
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/promise.js:606:10
  
  - async.js:138 Async._drainQueue
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/async.js:138:12
  
  - async.js:143 Async._drainQueues
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/async.js:143:10
  
  - async.js:17 Immediate.Async.drainQueues
    [robert-holzer-frontend]/[html-webpack-plugin]/[bluebird]/js/release/async.js:17:14
  

this outputs the first npm run start in a fresh environment of preact create

The cli version is preact-cli 1.4.1 and my npm version is 4.2.0 even with latest npm version 5.3.0 the same issue

my package.json:

{
  "name": "preact",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "eslint src && preact test",
    "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
    "build": "preact build",
    "serve": "preact build && preact serve",
    "dev": "preact watch"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "eslintConfig": {
    "extends": "eslint-config-synacor"
  },
  "devDependencies": {
    "eslint": "^4.3.0",
    "eslint-config-synacor": "^1.0.1",
    "if-env": "^1.0.0",
    "preact-cli": "^1.4.1"
  }
}
@reznord
Copy link
Member

reznord commented Jul 31, 2017

You need at least node v6 for preact-cli. Not sure why the check.js didn't kick out of the build process

@eweilow
Copy link

eweilow commented Jul 31, 2017

Getting the exact same issue and stacktrace as @lukasholzer with preact-cli 1.4.1

I did a fresh install (npm i preact-cli -g) and ran preact create projectname --sass.

node -v
v8.1.3

npm -v
5.3.0

Additionally, running either npm run -s serve or npm run -s dev results in the same error.

@lukasholzer
Copy link
Author

I used node version 7.x and 8.x (every is greater than v6 @reznord

@nephix
Copy link

nephix commented Jul 31, 2017

Same issue for me with preact-cli 1.4.1 and

node v6.11.1
npm v5.3.0

@mastilver
Copy link

mastilver commented Jul 31, 2017

html-webpack-plugin's maintainer here, it's an issue on our side: jantimon/html-webpack-plugin#753, please use html-webpack-plugin@2.29.0 in the meantime

@reznord
Copy link
Member

reznord commented Jul 31, 2017

So, probably rolling out to last version of html-webpack-plugin should work.

@eweilow
Copy link

eweilow commented Jul 31, 2017

Can confirm that installing the previous version of html-webpack-plugin by npm i html-webpack-plugin@2.29.0 inside a project created by preact-cli resolves the issue on my end.

@mastilver
Copy link

html-webpack-plugin@2.30.1 has been released

I'm not really sure how preact-cli is working, but I've done that to fix my build:

  • $ npm i -g preact-cli
  • $ rm -rf node_modules
  • $ rm package-lock.json
  • $ npm i

@reznord
Copy link
Member

reznord commented Aug 2, 2017

Fixes by updating html-webpack-plugin to 2.30.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants