Git Product home page Git Product logo

Comments (5)

stephane-tessier avatar stephane-tessier commented on July 27, 2024 3

the only error I found is when I run ng run my-project:server because there is types: [ 'node'] in the tsconfig.server.json file so it conflicts the exact same way.
I solved it by adding "skipLibCheck": true, in the compilerOptions of the tsconfig.server.json file.

Also, I think tsc --noEmit --skipLibCheck && eslint . --ext js,ts --quiet --fix is better than specifying the types

from ngx-env.

stephane-tessier avatar stephane-tessier commented on July 27, 2024 1

Not sure what you mean.

In my package.json I have:

    "@types/jasmine": "3.10.2",
    "@types/luxon": "2.0.7",
    "@types/node": "16.11.10",

So in tsconfig.json I tried to force jasmin and luxon:

  "types": ["luxon", "jasmine"],

but it didn't solve the problem.

BUT if I declare the types directly in the cli args, it seems to do the trick 🥳

tsc --noEmit --types jasmine,luxon && eslint . --ext js,ts --fix

It will do for now.
But if you have a cleaner solution let me know!
Thanks.

from ngx-env.

chihab avatar chihab commented on July 27, 2024

Thanks for reporting that @stephane-tessier.

Could you please confirm that you don't have any issues with type checking on your editor nor when using CLI commands (ng serve...)?

from ngx-env.

stephane-tessier avatar stephane-tessier commented on July 27, 2024

Yes, I can confirm that. Everything works fine except the tsc cli

from ngx-env.

chihab avatar chihab commented on July 27, 2024

The only way I see to make it work with tsc is to update the tsconfig files generated by the CLI, something like types: [] in tsconfig.json but not sure if that's the best/ a viable solution.

from ngx-env.

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.