Problem with babel-polyfill
jacargentina opened this issue · 7 comments
I'm having this issue when trying to run my tests on my webapp (which has node-fs-filesystem as a dep)
● Test suite failed to run
only one instance of babel-polyfill is allowed
3 | import fs from 'fs';
4 | import osName from 'os-name';
> 5 | import { filesystemSync } from 'fs-filesystem/lib';
I've tried removing the line from src/index.js
(the one `import 'babel-polyfill';) and then doing a test run, and everything runs ok. Can we remove it @philippefutureboy ?
I fear this would break the package if used individually. Have you tested it out outside of your webapp? Cause what might be happening is that you are already loading babel-polyfill
somewhere in your webapp's configuration.
When you say webapp, do you mean electron, or a hybrid framework like Ionic/React Native?
@philippefutureboy It is a react web app (for browser)
Yes, the thing there is that I have other modules which load babel-polyfill before!
Anyway, I've tried it, and the lib is just working right. I've already tried it on Linux & macOS. Do you think it is enough?
All good then. Can you make a PR?
I've done it on a branch. All yours for merge after green!
@jacargentina v2.1.2 is out!
@philippefutureboy not seeing it on nom yet... 🤔
Republished! I had some credential issues :P