Coder Social home page Coder Social logo

Failed import about web-translate HOT 2 OPEN

alsino avatar alsino commented on July 28, 2024
Failed import

from web-translate.

Comments (2)

mvolkmann avatar mvolkmann commented on July 28, 2024 1

I couldn't reproduce the error you encountered, but I encountered other errors.

When I created this library I was using React. Since then I've switched to using Svelte. But I hadn't yet used web-translate with Svelte. I tried it this morning and ran into issues. After digging into it I think the main issue is what Vite (used by SvelteKit) tries to bundle all of the code in web-translate even though some of it is only meant to be used in Node when generating translations.

I described a work around in the README of a new demo repo I created. See https://github.com/mvolkmann/web-translate-demo. I suspect with this change the generate-translations command may not work. If that's the case, you would have to manually add translations in files like es.json. Maybe that's not so bad though since Yandex no longer has a free tier for doing the translations.

I also updated all the dependency versions used by web-translate and published a new version which is 1.2.1.

See if my demo app works for you and then try to change your app to match what I'm doing in mine.

from web-translate.

alsino avatar alsino commented on July 28, 2024

Hi @mvolkmann !

Thanks a lot for the hints! This is really helpful. Unfortunately, there still seem to be issues when trying to install web-translate.

Will switch over to the above mentioned repo's issues from here on.

from web-translate.

Related Issues (4)

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.