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

Decorators causes Gatsby to crash #129

Closed
rossPatton opened this issue Feb 19, 2016 · 8 comments
Closed

Decorators causes Gatsby to crash #129

rossPatton opened this issue Feb 19, 2016 · 8 comments

Comments

@rossPatton
Copy link
Contributor

Was hoping to use https://github.com/FormidableLabs/radium with gatsby to make hover states and media queries much easier, but attempting to use the @radium decorator causes gatsby to choke.

when I remove the decorator gatsby works

edit: posted the wrong err

Debug: internal, implementation, error
    Error: Uncaught error
  at Object.exports.create (/Users/rosspatton/.nvm/versions/node/v4.1.0/lib/node_modules/gatsby/node_modules/hapi/node_modules/boom/lib/index.js:21:17)
  at Object.exports.internal (/Users/rosspatton/.nvm/versions/node/v4.1.0/lib/node_modules/gatsby/node_modules/hapi/node_modules/boom/lib/index.js:254:92)
  at Object.exports.badImplementation (/Users/rosspatton/.nvm/versions/node/v4.1.0/lib/node_modules/gatsby/node_modules/hapi/node_modules/boom/lib/index.js:290:23)
  at _error (/Users/rosspatton/.nvm/versions/node/v4.1.0/lib/node_modules/gatsby/node_modules/hapi/lib/protect.js:53:28)
  at Domain.<anonymous> (/Users/rosspatton/.nvm/versions/node/v4.1.0/lib/node_modules/gatsby/node_modules/hapi/lib/protect.js:27:20)
  at emitOne (events.js:77:13)
  at Domain.emit (events.js:169:7)
  at Domain.errorHandler [as _errorHandler] (domain.js:84:19)
  at process._fatalException (node.js:208:33)
@rossPatton
Copy link
Contributor Author

actually it appears to be a little more interesting than just the decorator

the decorator by itself doesn't cause problems, it's when I try to use radium specific styles like ':hover', etc.

@KyleAMathews
Copy link
Contributor

Hey @rossPatton I just pushed a new release with a bunch of upgrades. Could you try upgrading and see how things are working now?

@rossPatton
Copy link
Contributor Author

I've updated to 0.8.4 and now I'm getting a different error :(

ERROR in ./~/gatsby/dist/utils/web-entry.js
Module build failed: ReferenceError: Unknown plugin "react-transform"
  at PluginManager.subnormaliseString (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-core/lib/transformation/file/plugin-manager.js:147:13)
  at PluginManager.add (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-core/lib/transformation/file/plugin-manager.js:190:40)
  at File.buildTransformers (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-core/lib/transformation/file/index.js:237:21)
  at new File (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-core/lib/transformation/file/index.js:139:10)
  at Pipeline.transform (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
  at transpile (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-loader/index.js:12:22)
  at Object.module.exports (/Users/ross/Developer/workspace/test-gatsby/node_modules/gatsby/node_modules/babel-loader/index.js:71:12)

@KyleAMathews
Copy link
Contributor

Check out the upgrade guide, there's some new packages you need to install https://github.com/gatsbyjs/gatsby/releases/tag/v0.8.3

@rossPatton
Copy link
Contributor Author

Cool, so I followed that and the error is gone now. Unfortunately the original issue with Radium still exists

@KyleAMathews
Copy link
Contributor

@rossPatton could you push to Github your setup w/ radium where there's a crash so I could take a look at it?

@KyleAMathews
Copy link
Contributor

@rossPatton if this is still a problem, feel free to reopen!

benstepp added a commit to benstepp/gatsby that referenced this issue May 8, 2016
This change allows the user to provide a babelrc or a babel section in
their package.json. It also allows gatsby to be used without having to
specifiy a babelrc if the user doesn't need anything past what babel
provides as a default.

* It resolves all of the paths to become absolute such that the user can
crawl upwards as in gatsbyjs#239.

* It allows the custom usage of other babel plugins so that decorators
work as in gatsbyjs#129.
benstepp added a commit to benstepp/gatsby that referenced this issue May 8, 2016
This change allows the user to provide a babelrc or a babel section in
their package.json. It also allows gatsby to be used without having to
specifiy a babelrc if the user doesn't need anything past what babel
provides as a default.

* It resolves all of the paths to become absolute such that the user can
crawl upwards as in gatsbyjs#239.

* It allows the custom usage of other babel plugins so that decorators
work as in gatsbyjs#129.
@KyleAMathews
Copy link
Contributor

Fixed in #279 and released in 0.11

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

2 participants