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

update to babel 6, add semicolons after static props to conform #36

Closed
wants to merge 1 commit into from

Conversation

bdefore
Copy link

@bdefore bdefore commented Jan 12, 2016

Note that currently with the latest on npm 0.2.2, you'll get the following warning:

→ npm install --save async-props

npm WARN EPEERINVALID async-props@0.2.2 requires a peer of react-router@^1.0.0 but none was installed.

And if setting your dependency to rackt/async-props you'll get another error if you're on Babel 6:

d4: ~/code/universal-redux (async-props)
→ npmi

> async-props@0.2.2 postinstall /Users/d4/code/universal-redux/node_modules/async-props
> node ./npm-scripts/postinstall.js


> async-props@0.2.2 build /Users/d4/code/universal-redux/node_modules/async-props
> babel ./modules --stage 0 --loose all -d lib --ignore '__tests__'

SyntaxError: modules/AsyncProps.js: A semicolon is required after a class property (148:3)
  146 |     Component: func.isRequired,
  147 |     routerProps: object.isRequired
> 148 |   }
      |    ^
  149 |
  150 |   static contextTypes = {
  151 |     asyncProps: object.isRequired

These changes update the core library to use Babel 6 for compilation and fix the static props error, but until another npm publish happens you can set your dependency to bdefore/async-props#babel6-support

@taion
Copy link

taion commented Jan 12, 2016

Transpiled modules don't work that way – you're not supposed to import from modules/ directly. If you need to install from GitHub, transpile the package using its own toolset first.

@taion taion closed this Jan 12, 2016
@bdefore
Copy link
Author

bdefore commented Jan 13, 2016

right but at this point those are your only options for working with react router 2 with async-props until a new version is published. this PR is an attempt to fix that.

@taion
Copy link

taion commented Jan 13, 2016

Check it out locally, run npm i && npm run build, then install from there. That's how you normally work with repos that use transpiled code anyway.

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

Successfully merging this pull request may close these issues.

None yet

2 participants