Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.

Error when trying to generate a component that is stateless function #75

Closed
mwolson opened this issue Feb 15, 2017 · 0 comments
Closed

Comments

@mwolson
Copy link
Contributor

mwolson commented Feb 15, 2017

$ npm run generate

> scalable-react-boilerplate@1.1.0 generate /Users/mwolson/devel/interview/scalable-react-boilerplate
> plop --plopfile config/generators/index.js

? [PLOP] Please choose a generator. component - Add a component to the app
? [COMPONENT] Select the type of component Stateless Function
? [COMPONENT] What is the name of the component? Header
? [COMPONENT] Should the component use SCSS Modules? No
? [COMPONENT] Should the component use styled components? No
? [COMPONENT] Should the component have FlowTypes? No
? [COMPONENT] Should the component have PropTypes? No
? [COMPONENT] Would you like to import any commonly used grommet components? Heading, Header
[FAILED] add /Users/mwolson/devel/interview/scalable-react-boilerplate/app/src/components/Header/index.js Parse error on line 38:
...    </Box>  );}{{else}}function {{
------------------^
Expecting 'OPEN_ENDBLOCK', got 'INVERSE'

It looks like the cause is the lack of support for {{else if ...}} blocks prior to handlebars v3.0.0. Based on yarn.lock, seems like plop is using handlebars 2.0.0. Patch incoming shortly to fix.

RyanCCollins added a commit that referenced this issue Feb 17, 2017
…generator

Fix #75: Update template for stateless components
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant