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

TypeError: Cannot read property 'push' of undefined #20

Open
piotrkochan opened this issue Sep 24, 2018 · 4 comments
Open

TypeError: Cannot read property 'push' of undefined #20

piotrkochan opened this issue Sep 24, 2018 · 4 comments

Comments

@piotrkochan
Copy link

preact.config.js:

import asyncPlugin from 'preact-cli-plugin-async';

export default (config, env, helpers) => {
  asyncPlugin(config);
};

error:

 npm run build                            
> [email protected] build /media/sdb1/dev/preact/test-widget
> preact build --no-prerender --clean --template src/index.ejs --service-worker false

Error: Error at /media/sdb1/dev/preact/test-widget/preact.config.js: 
TypeError: Cannot read property 'push' of undefined

@hguillermo
Copy link

Getting the same error.

@ugened47
Copy link

Same error

@PhilTheAir
Copy link

same...

@cht8687
Copy link

cht8687 commented Mar 28, 2019

solution for this:

include es2017 in your .babelrc file:

{
  "presets": ["preact-cli/babel", "es2017"],
}

and perform

npm install --save-dev babel-preset-es2017

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