Indexing & Node Modules

preview_player
Показать описание
Recorded live on twitch, GET IN

Become a backend engineer. Its my favorite site

This is also the best way to support me is to support yourself becoming a better backend engineer.

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
Рекомендации по теме
Комментарии
Автор

Deleting node_modules has become one of the first things I do if a test unexpectedly failed.

FolkOverplay
Автор

This one time we were hitting deadline for a project when every developers local copy of the project just didn't want to compile anymore, except for _one_ machine. Spend two days trying to compare packages, try different NodeJS versions, dive through the node_modules folder to check versions of packages and what not. We ended up writing code without compiling/serving it and then committing it, pulling on the only working machine and compiling it. Then figure out errors on that machine, do ticket, somebody fix it. Test on that one machine, repeat. No help from dev tools or any other god damn tool for that matter.

We still have no clue what happened or why but it magically started working after some days on everyones machines.

I must have rimraffed the node_modules directory at least 666 times.

extium
Автор

IntelliJ has a feature called Repair IDE which will procedurally take steps to recalibrate and repair caches and indexes which for the most part will fix everything.

massy-
Автор

I built a Python server that I register my projects with and it automatically senses when I need to delete and reinstall node_modules and it does it for me.

Okay no, it doesn’t sense anything - it’s just a random timer up to 5 minutes but it works pretty well anyway.

rob
Автор

It’s a really weird day when you have dependency problems in any platform outside of node. In node it’s just at least one day a week if not everyday.

NickSteffen
Автор

IntelliJ is awesome for most platforms e.g., Flutter, Android native, C#, Python, etc. It's still better than any alternative for regular JavaScript/TypeScript e.g., targeting Node. It bogs down a little when working with React but I'm pretty sure that's React's fault.

steamerk
Автор

Deleting node modules is like rebooting a computer. We don’t know why we’re doing it or what voodoo happens but it works so we do it.

thegrumpydeveloper
Автор

Same.... for whatever reason, starting a new project for my react source with no changes tends to fix buggy compile errors, especially if I install multiple modules as I experiment with how I want to build.

jamesalewis
Автор

It's been a few years since I've had to delete node_modules and reinstall. Maybe there've been improvements in the npm CLI? Also, I mostly just end up using the same set of known-reliable dependencies these days.

steamerk
Автор

Gradle caches are an even larger nightmare

AFTstorm
Автор

The first thing I do when something breaks in any project with node modules is delete node modules and package lock 😂

SurfsUpSeth
Автор

Now imagine you’ve got a crummy corporate antivirus that has to peek at every single file that the indexer scans and can monopolize 600% or more CPU while doing it.

DavidPD
Автор

"dependencies": { "dependencyOne": { "dependencyFour": { "dependencySeventeen":

binglemcbawb
Автор

What does intellij have to do with node_modules?

jazzymichael
Автор

Indexing in Java projects is the other ring of hell, basically everything related to dependency changes has some invalidation of the internal IDE modeling of the world for supporting rich refactoring features, auto complete, etc

JustinTuchek
Автор

No installation of node needed just dockerize it and have a clean state all the time

sir_jordan
Автор

Never had issues with node_modules across machines. Then again, we use lockfiles and understand what semantic versioning is and how it works.

Like what is it that isn't working? Is it that it doesn't find the dependency suddenly? Or doesn't install packages?

dealloc
Автор

Java with it's maven dependencies suffer the same problem in IntelliJ...😢

jamsky
Автор

This is precisely why I like Bun. It should be fast and easy to reinstall node modules

Gnsbehehehh
Автор

can't clear cache for indexes of the project and reindex everything?

I don't use IDEs. Is it possible wo/ redownloading whole universe?

azeek