Giter Club home page Giter Club logo

Comments (5)

elalish avatar elalish commented on May 25, 2024

There's no way anyone can help without some background on what you're trying to do. It appears you're trying to build MV into your own TS project of some kind? Are you using a particular framework for that? There must be something wrong with how the dependency or import is specified, so maybe start by showing those from your code?

from model-viewer.

Pratik610 avatar Pratik610 commented on May 25, 2024

i am using React for this. as usual i have imported the MV in the App.js file import @google/model-viewer and using it across the app

from model-viewer.

elalish avatar elalish commented on May 25, 2024

"as usual" makes it sound like you've done this before and it's worked with model-viewer? Did something change recently? We don't have any React experience on this team, but others on our forums do and we know they've used it successfully, so it's probably some kind of import magic. Have you searched our discussions yet?

from model-viewer.

chamby avatar chamby commented on May 25, 2024

I assume @Pratik610 is using Webpack because if so version 5 of Webpack has a breaking change that requires imports to have a file extension. The relevant section is below. There is a flag to use the legacy behavior. I will try the flag as I am having the same issue. Ideally the file extensions could be added to model-viewer as well.

Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. *.js or *.mjs) unless you have the behaviour disabled with fullySpecified=false.

from model-viewer.

elalish avatar elalish commented on May 25, 2024

@chamby Thanks! PRs welcome if you find a change that will simplify this for users.

from model-viewer.

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.