Code Monkey home page Code Monkey logo

Comments (4)

lukasgeiter avatar lukasgeiter commented on September 3, 2024 1

FYI: I've moved the necessary @type packages to dependencies in v3.3.2

from gettext-extractor.

lukasgeiter avatar lukasgeiter commented on September 3, 2024

In the latest version I've upgraded to version 5 of the parse5 library which seems to be the cause of your issue. Are you also compiling the dist files of this package? Because that's not really necessary since it's already compiled from TypeScript to JavaScript.

In any case, a minimal working example of the problem would greatly help in figuring out what's happening.

from gettext-extractor.

Xesenix avatar Xesenix commented on September 3, 2024

hmm adding @types/[email protected] works for me but you are right that my project should use already compiled version of your library

Also minimal example is just typescript file with:

import { GettextExtractor, JsExtractors } from 'gettext-extractor';

parsed with

tsc --module commonjs

and tsconfig.json like this:

{
  "compilerOptions": {
    "moduleResolution": "node",
    "target": "es6",
    "module":"es6",
    "lib": ["es2015", "es2016", "es2017", "dom"],
    "strict": true,
    "sourceMap": true,
    "declaration": true,
    "allowSyntheticDefaultImports": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "declarationDir": "dist/types",
    "outDir": "dist/lib",
    "types": [
      "node"
    ],
    "typeRoots": [
      "node_modules/@types"
    ]
  },
  "include": ["src"]
}

And no dependency on parse5 becouse when you add dependency "parse5": "^5.0.0" problems doesn't appear anymore as instaling parse5 also installs typedefininitions for it

edit:
it looks that its problem with my tsconfig it was missing "skipLibCheck": true, so sorry about that this issue probably can be closed (alternative is moving @types/parse5 to dependencies)

from gettext-extractor.

lukasgeiter avatar lukasgeiter commented on September 3, 2024

No worries 😉

I'll consider moving it to dependencies. I didn't really want to install any packages that aren't absolutely necessary but maybe it would be a good idea...

from gettext-extractor.

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.