arthurintelligence / node-fs-filesystem

NodeJS Filesystem Utility
MIT License
19 stars 2 forks source link

Problem with babel-polyfill #27

Closed jacargentina closed 6 years ago

jacargentina commented 6 years ago

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 ?

philippefutureboy commented 6 years ago

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?

jacargentina commented 6 years ago

@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?

philippefutureboy commented 6 years ago

All good then. Can you make a PR?

jacargentina commented 6 years ago

I've done it on a branch. All yours for merge after green!

philippefutureboy commented 6 years ago

@jacargentina v2.1.2 is out!

jacargentina commented 6 years ago

@philippefutureboy not seeing it on nom yet... 🤔

philippefutureboy commented 6 years ago

Republished! I had some credential issues :P