Giter Club home page Giter Club logo

Comments (13)

xile611 avatar xile611 commented on May 17, 2024

I did an experiment and found no problem. Do you depend on react-router or any other packages which define history as a peerDependency?

from recharts.

bkniffler avatar bkniffler commented on May 17, 2024

Its really strange, it is not noted in the installation log, but it still appears in the node_modules folder. I've already cleared the cache, completely removed it, reinstalled it.

ohne titel

from recharts.

bkniffler avatar bkniffler commented on May 17, 2024

I've investigated it further, check out http://registry.npmjs.org/recharts/-/recharts-0.6.3.tgz

It includes history module. See here for more infos on this issue
npm/npm#9642

NPM2 seems to fix it, or use the workaround of @othiym23

"I can totally see how that would be confusing. A way to work around this for redux-react-router would be to add a postversion script that runs npm prune --prod, which will strip out devDependencies as long as
you publish right after versioning. (Using prepublish here is tricky because that will uninstall
devDependencies right after installling them.)

should the fix go in fstream-npm or util/lib/tar.js or both?
It should go in fstream-npm, which will fix it in util/lib/tar.js when we pull down the updated dependency."

from recharts.

xile611 avatar xile611 commented on May 17, 2024

So that's it. My local npm version is 3.3.12, so no problem.

from recharts.

bkniffler avatar bkniffler commented on May 17, 2024

Hmm.. strange. As far as I understood npm2 should have this fixed, but please look at the tarball
http://registry.npmjs.org/recharts/-/recharts-0.6.3.tgz

History module is still part of your published package, which shouldn't happen with your version, so there is a problem. Did you update npm after publishing recharts 0.6.3?

from recharts.

xile611 avatar xile611 commented on May 17, 2024

Yeah, it's really strange! I have used 0.6.3 for a long time .

from recharts.

bkniffler avatar bkniffler commented on May 17, 2024

You need to update npm to >= 3.4.0 and then publish a new version. Maybe you could also bump oneuijs to 0.3.6 in that release: #31

That should fix it.

from recharts.

xile611 avatar xile611 commented on May 17, 2024

Thanks! I will fix these problems soon.

from recharts.

xile611 avatar xile611 commented on May 17, 2024

It seems that the bug was resolved in npm2, but not properly fixed for npm3.

See the issue of react-router-redux:
react-router-redux issue

from recharts.

bkniffler avatar bkniffler commented on May 17, 2024

For npm3 it is fixed with 3.4.0

Here is a quote:

There are two ways for avoiding this issue
- Use the npm versions which is fixed the issue(>=2.4.10 || >3.4.0)
- Remove node_modules/history before publishing the package

from recharts.

xile611 avatar xile611 commented on May 17, 2024

I have try v3.4.0 and v3.7.3, the bug happened again.
So I checked the file utils/tar in all the 3.x versions. Then I find that the bug wasn't fixed in any 3.x version.

So I submitted a issue.
Hope fixed soon.

from recharts.

arcthur avatar arcthur commented on May 17, 2024

I fix the release script, and fix the history pack problem. We will publish next version to remove the package.

from recharts.

nancyagrwal avatar nancyagrwal commented on May 17, 2024

I'm trying to create Scatter plots using React and Recharts. But i keep on getting the following build error at various places in file, and nothing shows:

Uncaught SyntaxError: Unexpected token (
at:
"use strict";
function(series) {
var n = series.length, o = new Array(n);
while (--n >= 0) o[n] = n;
return o;
}
and other places.

What am I doing wrong?

from recharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.