Giter Club home page Giter Club logo

Comments (8)

yuanqingfei avatar yuanqingfei commented on May 17, 2024 1

I tried version 1.3.4, 1.4.0 and latest 1.5.1. All have this error.

Yes, You can reproduce.

you can clone: https://github.com/yuanqingfei/familyTree

then

npm install
npm run build

from d3-graphviz.

magjac avatar magjac commented on May 17, 2024 1

Thanks. I've reproduced the problem and will look into it during the weekend. Sorry, but I have to code for money during office hours 😅

from d3-graphviz.

yuanqingfei avatar yuanqingfei commented on May 17, 2024 1

Thanks a lot. You are welcome.

from d3-graphviz.

magjac avatar magjac commented on May 17, 2024

I think you cannot use individual source code files. Use ./node_modules/d3-graphviz/build/d3-graphviz.js instead. It's compiled to ES5.

Thanks for submitting this issue. If you are using this library, don't forget to Watch it to stay tuned for updates or even Star it if you like it.

You can also use Stack Overflow tags d3.js & graphviz or the d3-graphviz Slack to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly.

When asking for help, please include a link to a live example that demonstrates the issue, preferably on JSFiddle. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

from d3-graphviz.

yuanqingfei avatar yuanqingfei commented on May 17, 2024

Thanks for your quick reply. In fact, I met error first with d3-graphviz.js. Then I delete it on purpose to let it compile source code. The original error like this:

react-scripts build

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

./node_modules/d3-graphviz/build/d3-graphviz.js:98 

Read more here: http://bit.ly/2tRViJ9

Thank you very much for guiding..

from d3-graphviz.

magjac avatar magjac commented on May 17, 2024

Which version of d3-graphviz are you using?

Can you supply steps that I can use to reproduce? I don't know very much about React.

from d3-graphviz.

magjac avatar magjac commented on May 17, 2024

Wait a minute...

Maybe ./node_modules/d3-graphviz/build/d3-graphviz.js isn't ES5 after all. I use uglifyes instead of uglifyjs. If you can compile the code yourself it might work if you revert that part of 7be7d23

Sorry, I'm a newbie in this area. I can look deeper into it during the weekend.

from d3-graphviz.

magjac avatar magjac commented on May 17, 2024

With d3-graphviz v1.6.0 this now works, see below.

Thanks for giving me the opportunity to improve the usefulness of d3-graphviz and a reason to learn a lot of new fun stuff 😁.

magjac@magjac-VirtualBox:~/familyTree$ npm run build

> [email protected] build /home/magjac/familyTree
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

./src/components/dot/dotTree.js
  Line 3:  'd3graphviz' is defined but never used  no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  719.67 KB (-15.58 KB)  build/static/js/main.09960b45.js

The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb

The project was built assuming it is hosted at /familyTree/.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
To publish it at https://yuanqingfei.github.io/familyTree, run:

  npm run deploy

Find out more about deployment here:

  http://bit.ly/2vY88Kr

from d3-graphviz.

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.