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

Scaffold broken as soon as it is run #35

Open
digijin opened this issue Dec 17, 2015 · 11 comments
Open

Scaffold broken as soon as it is run #35

digijin opened this issue Dec 17, 2015 · 11 comments

Comments

@digijin
Copy link

digijin commented Dec 17, 2015

Tried on 5.0.0, 4.2.1, 4.0.0, 0.12.7 and all got the same error.

Installs fine, when I run npm start I get the following error that appears to come out of webpack:

> [email protected] start /home/james/workspace/network/awsconsole
> DEBUG=true node server.js

Listening at localhost:3000
webpack built 760b78bcfc171041ac0c in 778ms
Hash: 760b78bcfc171041ac0c
Version: webpack 1.12.9
Time: 778ms
    Asset     Size  Chunks       Chunk Names
bundle.js  58.9 kB       0       main
chunk    {0} bundle.js (main) 12.4 kB [rendered]
    [0] multi main 40 bytes {0} [built] [1 error]
    [1] ./~/querystring/decode.js 2.4 kB {0} [built]
    [2] ./~/querystring/encode.js 2.09 kB {0} [built]
    [3] ./~/querystring/index.js 127 bytes {0} [built]
    [4] (webpack)-hot-middleware/client-overlay.js 1.01 kB {0} [built]
    [5] (webpack)-hot-middleware/client.js?path=/__webpack_hmr&timeout=20000 3.24 kB {0} [built]
    [6] (webpack)-hot-middleware/~/ansi-regex/index.js 145 bytes {0} [built]
    [7] (webpack)-hot-middleware/~/strip-ansi/index.js 161 bytes {0} [built]
    [8] (webpack)-hot-middleware/process-update.js 2.95 kB {0} [built]
    [9] (webpack)/buildin/module.js 251 bytes {0} [built]

ERROR in ./js/index.js
Module build failed: ReferenceError: The plugin "react.displayName" collides with another of the same name
    at PluginManager.validate (/home/james/workspace/network/awsconsole/node_modules/babel-core/lib/transformation/file/plugin-manager.js:159:13)
    at PluginManager.add (/home/james/workspace/network/awsconsole/node_modules/babel-core/lib/transformation/file/plugin-manager.js:213:10)
    at File.buildTransformers (/home/james/workspace/network/awsconsole/node_modules/babel-core/lib/transformation/file/index.js:237:21)
    at new File (/home/james/workspace/network/awsconsole/node_modules/babel-core/lib/transformation/file/index.js:139:10)
    at Pipeline.transform (/home/james/workspace/network/awsconsole/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/james/workspace/network/awsconsole/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/james/workspace/network/awsconsole/node_modules/babel-loader/index.js:71:12)
 @ multi main
@Utsav2
Copy link

Utsav2 commented Dec 22, 2015

+1

@callummr
Copy link

Yup, I got the same.

@kevinold
Copy link
Contributor

@digijin @Utsav2 @callummr I am not able to reproduce, but wonder if there is a collision between any .babelrc files?

Here is where the react-display-name plugin is added in a .babelrc file included in the project: https://github.com/banderson/generator-redux/blob/master/generators/app/templates/_babelrc

Do you have a .babelrc in your home directory that may be conflicting?

@kevinold
Copy link
Contributor

Oh, and on second read of the error message, this might be a babel issue in that the plugins of the same name are "colliding". I'll investigate.

@kevinold
Copy link
Contributor

This appears to be happening elsewhere:

styleguidist/react-styleguidist#58

kaylanm added a commit to kaylanm/generator-redux that referenced this issue Jan 2, 2016
…vert to babel-plugin-react-transform 1.x (2.x is for Babel 6). Fix react-display-name plugin order by making react-transform run after.

Fixes banderson#35.
@martinffx
Copy link

Has this fix been released? Because I've just done clean install of the generator and am still exeriencing this exact issue.

Looking at the .babelrc in master and the one placed in the project by the generator differ by what seems to be the issue. I'm going to copy the .babelrc in master into my project and give it a go.

@alfafc
Copy link

alfafc commented Jan 21, 2016

Same here!

@todthomson
Copy link

If anyone finds a fix or work around please post it here thanks.

@kaylanm
Copy link
Contributor

kaylanm commented Jan 22, 2016

@martinffx you are correct, it has not been released yet.

The fix is simple, apply the .babelrc change as you said and then ensure you have babel-plugin-react-transform@^1.0.0 - the 2.x branch is meant for Babel 6.x, which this generator has not been updated to use yet (though there is a good PR out there for it).

@martinffx
Copy link

@kaylanm thanks, I managed to manually edit the generated code into a working state. Would be nice to fix this generator though. What needs to happen to get this PR merged?

@banderson
Copy link
Owner

Hey everyone, I missed this yesterday because it was marked as closed. I released a new version yesterday that includes the babel6 upgrades and a few bug fixes. I hope that this is all set now, so please let me know if you see anything like this after using v0.4.1

@banderson banderson reopened this Jan 27, 2016
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

9 participants