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

with-styled-jsx-postcss example is broken (since beta.21) #1125

Closed
sarukuku opened this issue Feb 14, 2017 · 2 comments
Closed

with-styled-jsx-postcss example is broken (since beta.21) #1125

sarukuku opened this issue Feb 14, 2017 · 2 comments

Comments

@sarukuku
Copy link

I'm talking about this.

To reproduce just follow the steps on the readme. When running npm run dev you'll get an error:

 ERROR  Failed to compile with 1 errors

 error  in ./pages?entry

Module build failed: TypeError: unknown: Duplicate declaration "_JSXStyle"
  1 | import _JSXStyle from 'styled-jsx/style';
  2 | import React from 'react';
> 3 | import _JSXStyle from 'styled-jsx/style';
    |        ^
  4 | export default (function () {
  5 |   return React.createElement(
  6 |     'div',
    at File.buildCodeFrameError (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-core/lib/transformation/file/index.js:431:15)
    at Scope.checkBlockScopedCollisions (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/scope/index.js:398:27)
    at Scope.registerBinding (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/scope/index.js:592:16)
    at Scope.registerDeclaration (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/scope/index.js:516:14)
    at Object.Declaration (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/scope/index.js:176:36)
    at NodePath._call (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:76:18)
    at NodePath.call (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:48:17)
    at NodePath.visit (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:105:12)
    at TraversalContext.visitQueue (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/context.js:150:16)
    at TraversalContext.visitMultiple (/Users/Joonas/test/with-styled-jsx-postcss/node_modules/babel-traverse/lib/context.js:103:17)

 @ multi ./~/next/dist/client/webpack-hot-middleware-client ./pages?entry

> Ready on http://localhost:3000

Everything works well with beta.20 but after that nope.

@sarukuku
Copy link
Author

@giuseppeg you're probably related to this somehow? 😄

@timneutkens
Copy link
Member

Duplicate of #964

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
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

2 participants