homerchen19 / nba-color

🏀 🎨 Get all NBA team's color.
https://www.npmjs.com/package/nba-color
MIT License
51 stars 7 forks source link

Importing bug #13

Closed mattjared closed 5 years ago

mattjared commented 5 years ago

Using the latest version I'm running into an error trying to import the package. Given the following component in a react app (generated with create-react-app) I'm getting a rambda error in the console when I attempt to view the app.

Code:

import React, { Component } from 'react';
import { getMainColor } from 'nba-color';
class Header extends Component {
  render() {
    const color = getMainColor('LAL');
    return (
      <div className="Header">{ color }</div>
    );
  }
}
export default Header;

Error in the console preventing the page from loading...

Failed to compile.
./node_modules/nba-color/lib/nba-color.mjs
Attempted import error: 'ramda' does not contain a default export (imported as 'e').

Any idea what might be causing this?

homerchen19 commented 5 years ago

Sorry it's my fault. Will fix it asap. Thanks for reporting the issue.

homerchen19 commented 5 years ago

Hey @mattjared This issue should be fixed by 312016f80da5e01b30e54779f961dac503c71c41 Please let me know whether it works for you thanks.

mattjared commented 5 years ago

Thanks! Working flawlessly now.