Giter VIP home page Giter VIP logo

Comments (9)

ideashower avatar ideashower commented on May 13, 2024 1

@arangates I was able to get this to work by specifying a relative path (see: vercel/next.js#883).

ie ../node_modules/frappe-charts/dist/frappe-charts.min.esm

from charts.

pratu16x7 avatar pratu16x7 commented on May 13, 2024

@tobiaslins Would you like to take a look?

from charts.

tobiaslins avatar tobiaslins commented on May 13, 2024

hi @ronihcohen

Can you please share more details?

  • What did you exactly import?
  • Please show me your package.json

from charts.

ronihcohen avatar ronihcohen commented on May 13, 2024

@tobiaslins You can find my example here: https://github.com/ronihcohen/frappe-charts-next-example

from charts.

pratu16x7 avatar pratu16x7 commented on May 13, 2024

@ronihcohen Seems like an import problem; check the module path on line:
https://github.com/tobiaslins/frappe-charts-react-example/blob/master/src/chart.js#L3

with the one in your repo:
https://github.com/ronihcohen/frappe-charts-next-example/blob/master/components/chart.js#L3

from charts.

ronihcohen avatar ronihcohen commented on May 13, 2024

@pratu16x7 still not working :-(

Unexpected token export
/frappe-charts-next-example/node_modules/frappe-charts/dist/frappe-charts.min.esm.js:3270
export default Chart;
^^^^^^

SyntaxError: Unexpected token export
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:576:28)
    at Module._compile (/frappe-charts-next-example/node_modules/source-map-support/source-map-support.js:492:25)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)

Also I would update the README.md https://github.com/tobiaslins/frappe-charts-react-example/blob/master/README.md with the proper import. @tobiaslins

from charts.

tobiaslins avatar tobiaslins commented on May 13, 2024

@ronihcohen I thought nextjs does the transpiling, not sure why it doesn't know export

from charts.

pratu16x7 avatar pratu16x7 commented on May 13, 2024

Not a next.js expert here. Closing as not a project-specific issue. Feel free to open in case of updates.

from charts.

arangates avatar arangates commented on May 13, 2024

Still exists

from charts.

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.