Giter Site home page Giter Site logo

Comments (5)

JanEbbing avatar JanEbbing commented on May 26, 2024

Hi, which version of NodeJS are you using? Are you using some kind of framework to build an application with (React Native, Ionic, etc)? It seems the os module of Node isn't available.

I will create a task anyway to make sure an exception in that function doesn't break the library.

from deepl-node.

alandolsi avatar alandolsi commented on May 26, 2024

Hi,

I test it with node v18.16.1 (npm v9.5.1) and with node v16.20.0 (npm v8.19.4)
I am using vitejs.

thank you

from deepl-node.

JanEbbing avatar JanEbbing commented on May 26, 2024

Thanks, I can reproduce this and will look into it.

from deepl-node.

JanEbbing avatar JanEbbing commented on May 26, 2024

Hi @alandolsi .

  1. To fix the direct error you are seeing, you need to polyfill the os module as Vite does not. There are some people with similar problems and their solutions here, here and this is a module which does this.
  2. However, this is a NodeJS package and the above is a bandaid solution. Please read this answer why we don't support running in the frontend (I think this is the next problem you would run into, aside from likely leaking your API key in the frontend source code). You will need some backend that can make the DeepL API requests.

Please let me know if this doesn't solve your problem.

from deepl-node.

alandolsi avatar alandolsi commented on May 26, 2024

@JanEbbing Thank you for help.

from deepl-node.

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.