Комментарии:
Setting up a JS/TS environment is the worst. Python is pretty bad too. Especially setting up tests, linting and everything else that goes into maintaining a large project. Compare that to other environments like GoLang (go mod init project_name), Kotlin (IntelliJ already comes with Gradle and JUnit), Swift (project is good to go in Xcode), Rust (cargo new project-name) etc. No need to install hundreds of node modules and configure VS Code to do linting etc. It is especially helpful with Coding Katas and introducing people to coding and things like TDD.
ОтветитьThis video was killed by Bun
ОтветитьHello, I am using node JS and I am trying to use ECMA script with both js and TS files. I have set in my package.json "type: module", but when it fails to build with the output: "unknown file extension TS"
ОтветитьHow you create tsconfig file
ОтветитьYou're a magician for sure!!
ОтветитьThis video is obsolete now since everyone is gonna jump to either deno or bun 😂
ОтветитьI am getting my errors in javascript code although I have sourcemap set to true. How could i fix that?
Ответитьtsconfig.json file
{
"compilerOptions": {
"module": "Node",
"moduleResolution": "Node",
"target": "ES2020",
"sourceMap": true,
"outDir": "dist",
},
"include": ["src/**/*"],
}
This is amazing. Thank you :)
ОтветитьExactly what I needed . Perfect video!
ОтветитьWhy not just use ts-node, it works and it seems like a waste of time to be configuring this instead of solving your actual problem
ОтветитьThis is the first try I gave to typescrtipt and I can't import my own modules. It does not matter what I do, it keeps giving me the same error: "Cannot find module". Why is so stupid hard to start a project with this tool?
Ответитьi was here for the module thing, thanks
ОтветитьStill get an error when wanting to build :( - "This is not the tsc command you are looking for"
ОтветитьHow to build a project with this config? It's not generating JS code. I tried some stuff but it errors.
ОтветитьHow is this a purposely done thing in today's day and age?
ОтветитьGreat info but slow down!!
ОтветитьLove it! Looking forward to watching your full course. But please do it for experienced developers too
ОтветитьThank you so much!
ОтветитьThank you so much!
ОтветитьExcellent tutorial!
Ответитьyou saved my hairline
ОтветитьNoobalert.
Do you install typescript globally or per project?
NodeJs support for TypeScript is a joke, and not a good one. After all these years one might think that something as basic as that should already be covered... but nope.
ОтветитьThanks for this! Setting up a new Node project in 2023 is:
1 hour setting up the build environment
1 hour setting up linting
1 hour getting webpack to work
1 more hour optimizing everything
3 hours researching Deno / Bun / Vite, then deciding it's not worth it
1 hour wondering if you're better off with plain JS
1 hour remembering what you wanted to build
So nodeTs?
Ответитьtime to change package.json to package.tson
ОтветитьFirebase, typescript, zod, no more error 🎉
ОтветитьMadness....... ?
THIS IS JavaScript ecosystem 🔥🔥🔥🔥🔥🔥
If you guys are getting this error after setting up the tsconfig
error TS18003: No inputs were found in config file 'D:/abc/xyz/tsconfig.json'. Specified 'include' paths ORK/suman ap
were '["src/**/*"]' and 'exclude' paths were '["dist"]'.
add this to your ts congif
"include": ["src/**/*", "**/*.ts"],
and run npm run build again, it should work fine
People keep saying i should use ts instead of js. This bag of nonsense is why i don't.
ОтветитьDo the course in strict:true mode pls.
ОтветитьSetup is a noun. Set up is a verb (phrase). You cannot setup anything. But you can set something up.
ОтветитьGuys what happened, who's responsible for this, what happened, why did y'all let this happen, and fucking who's responsible for this clusterfuck of an ecosystem
ОтветитьIt's truly a peculiar experience see how this channel's owner is gradually descending into madness by the hand of web technologies mostly.
I just can't look away... keep the hard work
exactly what I needed, thanks.
ОтветитьAdding ".js" is a hack. I was hoping this tutorial shows how to do it properly
ОтветитьThank You
ОтветитьCould you go over some scenarios for building and publishing. For instance, I'm creating a base server implementation (basically an express wrapper with auth middleware) and I would like to publish it to a local npm registry (Verdaccio).
It publishes everything, not just the dist folder, and I'm not sure how to handle dependencies.
I have some issues with importing the server package as well, needing to do a second deconstruction of the default export for the dependency.
A good up to date minimal setup for building and publishing would be really cool! Something with build to dist, publish from dist and importing the package somewhere (maybe even with import instead of require)
If instead "include": ["src/**/*"] you do "include": ["src/server/**/*"] and you create directory src/server/<*.ts files here> it does not work.
So i decided to do 1:1 as video, getting error TS6046, aparently NodeNext is not recognized.
This JS ecosystem is nightmare, 3 month old video is outdated already? Every fking time. There is not a single UT video which you can follow step by step to setup JS stuff because every fucking minute there is new version, new framework, new way of doing stuff and old way of doing things doesnt work. Every video is deprecated before YT manages to process it.
I spent 3 hours on fixing this. Thank you so much.
ОтветитьThanks for the tutorial. JS/TS mix ES/CommonJS in node just sucks. Always getting into some troubles while importing various modules. Tried several settings (with type module and without and nothing works 100% time). And importing JS while typing TS looks just weird. Any option to to bypass it? Your Sepukku joke is not far from truth bro, lol.
Ответитьevey once in a while i come back and watch this video
ОтветитьThis actually sucks ass, as I try to learn TypeScript I just want to start a goddamn npm project and start typing code, not having to configure all this by hand
Goddamn, I hate programming sometimes
was hoping you would cover how to run the equivalent of nodemon when a change is made to the typescript source code.
ОтветитьExcellent!
ОтветитьWhat is the name of the theme for folders in this video?
Ответить