Coder Social home page Coder Social logo

Comments (9)

great9 avatar great9 commented on June 26, 2024

this happens with 0.77, 0.76 and 0.72
node versions 20 and 18.19.1

from fuels-ts.

great9 avatar great9 commented on June 26, 2024

also problems with type-fest import in fuels-ts

from fuels-ts.

nedsalk avatar nedsalk commented on June 26, 2024

By running pnpm tsc app.ts typescript's default compiler options are used. This still emits the app.js file, but it prints out problems typescript finds in the dependencies - some due to excessive stack depth due to the recursive type generics are programmed, others due to a dependency using >ES2015 features while tsc's default is ES3, etc.

Long story short, running pnpm tsc app.ts --skipLibCheck stops the errors being printed out and the user will get app.js.

However, I'd highly suggest looking into using a tsconfig file and running pnpm tsc -p tsconfig.json. This one is a good starter.

from fuels-ts.

great9 avatar great9 commented on June 26, 2024

By running pnpm tsc app.ts typescript's default compiler options are used. This still emits the app.js file, but it prints out problems typescript finds in the dependencies - some due to excessive stack depth due to the recursive type generics are programmed, others due to a dependency using >ES2015 features while tsc's default is ES3, etc.

mine is set to es2022

from fuels-ts.

nedsalk avatar nedsalk commented on June 26, 2024

@great9 can you share your tsconfig.json contents with us and the full error log that gets produced?

from fuels-ts.

great9 avatar great9 commented on June 26, 2024

@great9 can you share your tsconfig.json contents with us and the full error log that gets produced?

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Node 18",
  "target": "es2022",
  "compilerOptions": {
    "lib": [
      "es2022",
      "dom"
    ],
    "module": "commonjs",
    "moduleResolution": "Node",
    "target": "es2022",
    "esModuleInterop": true,
    "skipLibCheck": false,
    "forceConsistentCasingInFileNames": true,
    "outDir": "dist",
    "declaration": true,
    "strict": true,
    "noUnusedLocals": true
  },
  "include": [
    "src/**/*"
  ]
}

from fuels-ts.

nedsalk avatar nedsalk commented on June 26, 2024

Thanks, can you set skipLibCheck to true and see if it fixes it?

from fuels-ts.

great9 avatar great9 commented on June 26, 2024

Thanks, can you set skipLibCheck to true and see if it fixes it?

I'm sure it will, but will the app work? Former version worked with skipLibCheck set to false...

from fuels-ts.

nedsalk avatar nedsalk commented on June 26, 2024

The quick answer is it'll work because skipLibCheck is a stricter setting for compile-time checks and it doesn't affect the runtime. I'd have to do a deeper diver to understand which dependencies we (or you) introduced that's creating a conflict that skipLibCheck finds.

from fuels-ts.

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.