-
-
Notifications
You must be signed in to change notification settings - Fork 486
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
ERROR in only one instance of babel-polyfill is allowed @ ./~/bootstrap-loader/loader.js 1:0-44 #16
Comments
I was about to create an issue for this but you beat me to it :) Are you using Babel 5 in your project? bootstrap-loader v1.0.3 includes the Babel 6 polyfill which will throw that error if your project is also pulling in the Babel 5 polyfill. You could try installing v1.0.1 of bootstrap-loader for now and see if that resolves it. |
yep, I'm trying to upgrade to babel 6, but there some troubles I need to solve ;( But to the user of babel 5, your solutions seems like a workaround for now |
I'm in the same boat, still on Babel 5, which is why I was going to create an issue to see if they intended to support projects which haven't upgraded yet. |
👍 |
@AllenFang @strawbrary |
Also I'll check node version so |
@alexfedoseev, it's a bad news for this repo and thanks your helping. Anyway, is there any basic docs or getting started for contributing this repo, I thinks maybe I can do some bug fixing or something like that. |
@AllenFang I invited you to our slack room! Thanks so much for offering help! |
@AllenFang I added Contributing guide with short explanations how things work. Let me know if you want to hack on this issue. My current plan is: /* ./src/bootstrap.loader.js */
if (semver.lte(process.version, '0.12.x')) {
const babelLatest = 'babel-polyfill';
const babelPrev = 'babel/polyfill';
const isBabelLatest = require.resolve(babelLatest);
const isBabelPrev = require.resolve(babelPrev);
if (!isBabelLatest && !isBabelPrev) {
throw ...
}
if (isBabelLatest) {
require(babelLatest);
} else {
require(babelPrev);
}
}
// imports ... |
Thanks your helping, I'll spend some time to study and try my best to contribute this repo |
Thanks, @AllenFang! |
@AllenFang any updates on this? If you're currently busy, I can handle this issue. |
um.. little busy, i think you can patch this issue if you have free times. sorry |
@AllenFang Sure 👍 |
I am also having this issue when trying to use both bootstrap-loader and awesome-typescript-loader. |
@AllenFang @strawbrary @gpicazo |
@alexfedoseev It's working for me. Thanks! |
@alexfedoseev I am using it with the react-starter-kit and was still showing an issue with regards to babel-polyfill |
@yourmediafriend What version of node are you using? Any help debugging your situation would be appreciated. @gpicazo did the latest fix your issue? |
@justin808 Turns out I was using an antique version of node. Upgraded to v5.4.1 and everything is working fine. Thanks for pointing me in the right direction. |
@alexfedoseev, finally, I've time to test this issues, but some problem still remain Then I remove node_modules and install again and run my webpack dev command, but got the following message:
There's a first problem: However, I just install [email protected] and run again, but got another issues
It's the second problem node --harmony ./webpack/webpack-dev-server.js so I need to add this |
@AllenFang |
@alexfedoseev, ok, I will try it ! |
@alexfedoseev, please check #29, I think this patch should solve this issues correctly |
@alexfedoseev Should we merge? |
This part shouldn't affect users |
I've tested it on [email protected] and it's work fine |
An error is thrown if a process attempts to load babel-polyfill more than once: `ERROR in only one instance of babel-polyfill is allowed`. See shakacode/bootstrap-loader#16 Signed-off-by: Logan Koester <[email protected]>
I upgrade
bootstrap-loader
according #13, and it work for [email protected] and earlier, but I got another problem forbabel-polyfill
is loaded repeatedly.the error message is in the following:
The root cause is I wrote my dev webpack config with es6, and I add
require('babel/register');
this line in mywebpack-dev-server.js
Anyway, if re-write whole webpack config with es5 and it's work, so have any idea to solve it or did I miss something?
Thanks :)
The text was updated successfully, but these errors were encountered: