Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "node_modules"
*click "Empty Recycle Bin"*
*removing 134.389 files. Time remaining: about 15 minutes*
Me: What the fuck is happening?!
*open Recycle Bin*
*see there is 3 node_modules folder*
Me: oh, okay sorry. Thats pretty normal.16
one big fucking note to starting Node.js programmers
seriously you're a fucking retard if you do commit that shit16
I just hate npm dependencies.
If you want to write a small website with npm dependencies (some frontend deps like Bootstrap and some development deps like gulp or babel) you will have more npm dependencies in your project than own code. It is ridiculous, how some lazy developers just add dependencies to their projects, without evaluating their dependencies. The source code of one of my projects is around 4MB (without any dependencies). If you then run yarn as required, it grows to around 80MB (where 73MB are node_modules).
This is just terrible.
I rant about this, as I made the mistake to upload my node_modules directories when restoring a backup of my server. Worst idea one could ever have.9
This guy from my college uploaded node_modules to github 🙄
He's basically helping people to avoid writing the npm install command.12
Haven’t been on here for ages, but I felt like I needed to post this:
This is long, and it might make you cry.
A couple of months back I worked for a completely clueless dude who had somehow landed a contract for a new website for a huge company. After a while he realised that he was incapable of completing the assignment. He then hired me as a subcontractor and I deleted literally everything he had done and started from scratch. He had over promised and under explained what needed to be done to me. It took many sleepless nights to get this finished with all the amendments and I had to double my pricing because he kept changing the brief.
Even after doubling my prices I still put in way too many hours of work. At one point I had enough and just ghosted the guy as I had done what he asked, and when he submitted it to them they wanted changes. He couldn’t make the changes, so I had to. He wouldn’t pay me extra though. I decided it wasn’t worth my time.
A couple of days ago I heard from him again. He had found another subcontractor to finish the changes. He still needed a few things though, so he promised me that I would get paid after fixing those things. I looked at the few things he had listed in our KANBAN and thought it was a few easy tasks.. until I opened the project..
I had my computer set up to sync with his server because he wanted everything done live and in production. So I naturally thought I would just “sync down” everything that the other subcontractor had done.
Here is where the magic started to happen.. I started the sync and went to grab a glass of water, and it was still running when I came back. I looked at the log and saw a bunch of “node_module” files syncing - around 900 folders. Funny thing is; neither the site nor server has anything to do with node..
I disregarded this and downloaded the files in a more manual fashion to a new folder. Interestingly I could see that my SCSS folders had not been touched since I stopped working on the project.. interesting, I thought to myself..
Turns out, the other subcontractor had taken my rendered and minimised CSS file, prettified it and worked from there. This meant that the around ~1500 lines of SCSS neatly organised in around 20 files was suddenly turned into a monster of a single CSS file of no less than 17300 lines.
I tried to explain to the guy that the other subcontractor had fucked up, but he said that I should be able to fix it since I was the one that made it initially. I haven’t replied. My life is too short for this.8
So today I decided to switch to angular 4(material) on a project I had done. I have to say I am shocked by the sheer size of the node modules dependencies I have to install. Why wouldn't they just ship it all in one package. 😤 I had to install the client, material SDK, animations etc and all this is happening over shit sub-saharan Africa internet speed. I have been setting up for the past 5 hours and I'm only halfway through. If anyone reading this rant has a company that works to bring internet to Africa please hurry. We need you.4
npm install -g create-react-app
du -sh ./hello-world/node_modules
FUCKING SHIT ! IS THIS WHAT YOU CALL A QUALITY REPO ?
FUCKING NODE_MODULES IN YOUR FUCKING REPO ?14
We lost a frontend developer who used dozens of hipster libraries without any communications with other devs and replaced him with this one that has just pushed all the node_modules to master branch with all of her local config files. God. Fucking. Dammit.7
Downloaded a Hello World template for a HTML/hybrid mobile app... My node_modules folder has a backup of The Internet now...4
I literally just cleared 150Gb from my laptop by deleting the node_modules folders, of projects I'm currently not working on 🤦♂️11
When I Install An NPM Package .........
1.Runned The Install...
2.Watched the Progress Bar For 2secs
3.Got Bored, Opened Chrome for some entertaining content ( ͡° ͜ʖ ͡°)
4.Rechecked the Install after 20mins still 15%
5.Did take a break, ate something
6.Rechecked still 27%
7.Watched a little while the progress bar until I saw the Fatality.
CMD Has Stopped Working...9
"Delete node_modules folder and execute npm install" is the js version for "reboot the machine". Often works, but no one knows exactly why.3
this is getting ridiculous8
My client changed the requirements again. I'm in pain.
- "You want to see pain?" my colleague said. Go read Apple support forums. That's pain.
I became addicted. Every time I died and every time I was born again. Resurrected.
During the night, I was crying in the Apple forums for an official answer that would never come. During the day, I was surfing StackOverflow to fix my problems. You get "single-serving" friends there. They help you, you help them, and then you never see them again.
- "Then you install Stack and boom, you're done. It's that easy to go functional."
That's how I met him.
- "No, why?"
- "So that they can distract you while they put backdoors in them. So that you don't have time to check all of their code".
- "You are by far the most interesting "single-serving" friend I've ever met"
Then, my hard disk died. Of course, I didn't have backups: nobody has enough space for all those node_modules folders. All my addictions, lost.
Then I wrote him. If you asked me now, I couldn't tell you why I wrote him. We chatted a lot.
- "It's late, I should really go search another hdd on ebay"
- "Ebay? You called me so you could have my old hard disk."
- "No, I..."
- "Come on."
He sent me his old hard disk. It was a 256MB hard disk, but it was fine for running Arch. Then he asked me to rant about my problems in front of him.
- "I want you to rant as hard as you can"
- "Are you serious?"
We ranted all night about our bosses and clients and their fucked up requests. We kept in touch, and after a while more people were ranting with us. Every week, he gave the rules that he and I decided.
- "The first rule of devRant is -- you don't talk about devRant. The second rule of devRant is -- you don't talk about devRant."
I like to think this is how devRant started. This might also be the reason why we never see @trogus, only @dfox. A lot of shit still needs to happen.8
I'm starting to hate js. Every library needs atleast 1000 other libs. I just blew the node_modules folder to 100mb with just one npm require17
Man how do you skinny devs keep so skinny? I'm not even eating fat things and I'm nearing to light obesity... Is there a patch that I missed? apt update says it's up to date?20
If your room is a bit cold, simply initialize a node project in a Dropbox directory and let the node_modules folder syncing be your personal heater2
I was watching Ryan's talk on YouTube about "10 mistakes he regrets in Node " then on a point about node_modules he pulls this one up 😂6
So I just opened the node_modules folder of a blank angular app...
...yeah, I'm never doing that again.2
"We live in an age where people install npm packages like they’re popping pain killers"
~ David Gilbertson2
$ npm install ...
$ added 10 packages from 7 contributors and audited 21813 packages.
I realized that after some point you don't even think about your project dependencies growing. Because even adding 10 packages, it looks like it doesn't even changes the total number of packages. 21813, 21920, 21980... Does it even matter? Fuck.7
How do I even start?
The guy that's supposed to be our extra resource, our go-to person, asked me why node_modules and typescript output files are not committed.
And by typescript output files, I mean the compiled .js files. Shoot me now...
All he does all day is waste time! Useless calls scheduled way too early, 'cause IST & why the heck not?
And don't even get me started on his "knowledgeable" colleague who spent 2 friggin' days on figuring out how to find an element in an array.
I mean ok, I get that the language is new and the syntax is different, but boy, how I wish that was the problem! But nooo, her issue was figuring out the damn logic behind it!
Not to mention that I gotta do the code review and she keeps ignoring the changes that I ask of her unless I raise that in our daily meeting and reports stuff as done even before submitting a damn pull request. Also, I gotta shut up and take it, 'cause they are the client's internal resources, which has me ranting about it at 2 a.m. T_T
It literally just happened:
my boss taught me how to use npm, bower and similar to have plugins while developing websites.
This time around we had a project which is divided among different repositories.
One was a foundation project using npm to build, the other one was a socket.io server, using actual nodejs
boss thought: "well they both have node_modules, let's merge them and merge the package.json as well
Nothing worked anymore.
Had an idea for an app. I started writing the prototype in Node since I just had a simple API in mind. Wanted to have some very basoc crud functionality going and then hook up a nice interface to it. It has to do with logistics and analytics so I just wanted to start sketching something small, and being that i have been successful in doing an API like this in the pass with node and mongo for a local company I said why not.
I have finished a good chunk of it. Gotta love that js productivity. But what tripped me out about it was:
Check how big the folder size is: 387mb
I tripped, there was no way in hell this shit was that heavy. I am basically using Koi(to give it a whirl instead of express, gotta start testing koi sometimes right?) And some joi with morgan and winston. That is it. I am using mongo since legit its the only one i know, even with that there really can't be that much right?
Check node_modules size.....10mb....wtf? What
Sure as shit....forgot that i was storing the mongo data folder inside the app's root folder.
This would have been nothing if it would have taken me 30 seconds to figure it out.
I was losing my mind for 30 mins before i decided to properly verify
I need some sleep6
Interview tip #420
If you are asked to code a small app @ home, ffs, don't send the interviewer the node_modules folder!3
Synchronizing my OneDrive account with my Linux desktop. Not only did I apparently store a uni project on fucking OneDrive instead of using git (in my defense, it was 2 years ago), but I didn't even exclude the node_modules folder!!6
Am I the only one who finds this idea ridiculous?
Github’s marketing department is jumping the shark by storing most popular repos in Svalbard mines.
Please do not archive nodejs for future civilizations! It increases their risk of dying out, as we did by wasting fossil energy on node_modules.4
Enough is enough! I can't do it anymore!
alias pm='python manage.py'
alias ga='git add .'
alias gc='git commit -a'
alias gi='git init && touch .gitignore && printf ".idea \n venv \n node_modules \n out \n *.iml \n *.log \n build \n target" > .gitignore'
alias gp='git push'
alias gps='git push --set-upstream origin master'
alias gr='git remote add origin'
Much better :D13
I just watched a talk given by Ryan Dahl, highlighting what he considers to be some early design mistakes with Node:
- Removed early version of Promises
- Not sandboxed by default
- GYP compiler
- require() without extension
- index.js by default
Also, his new project Deno sounds like Node 2.0. Interesting!4
Last night, I had a nightmare. After I freshly installed Debian on my laptop, i run `ls` inside root dir, then i saw `node_modules` inside of it.
face screaming in fear
Unicode: U+1F631, UTF-8: F0 9F 98 B11
I will die younger because of node packages
It's like quantum mechanics, so undeterministic, even with yarn.lock, I had this meeting to demo software and I was ready for 2 min past the meeting time, having worked nearly all night to save monorepo yarn workspaces issues where some module has peer dependency it shouldn't have and some other module installed a newer version of a package which broke another module with another version of the same package, one module checks if it's got an instanceof another package, but it returns false because it's another version of the same package that created it so X !== X.
I nearly had a nervous breakdown and my node modules won't fix when I remove all node_modules in the yarn+lerna monorepo and reinstall from scratch... it's like seeing ghosts with these errors all works for months and then a butterfly splashes its wings near 1 node module and the entire app fails apart.
My business partner who claim to be the best Wall Street programmer, probably 160 years ago, decided to improve our core system written in Go.
He dragged a *shortcut* of *whole* local github folder into Vendor(sort of node_modules), Manually changed commit hash in Gopkg.lock, etc,
Next morning I woke up to 24 failed builds on Master; all protobuf redone with his unknown gogo version, database trigger function with changed logics added parameters, and a text message “has anyone experienced build corruption? Works on my mac”
My other business partners said “it’s okay, He’s going through tough divorce needs some distraction”
F M L1
I hate fucking people that commit into repository all libraries and modules under node_modules or vendor/gems making impossible to search examples on github.11
Running a fucking conda environment on windows (an update environment from the previous one that I normally use) gets to be a fucking pain in the fucking ass for no fucking reason.
First: Generate a new conda environment, for FUCKING SHITS AND GIGGLES, DO NOT SPECIFY THE PYTHON VERSION, just to see compatibility, this was an experiment, expected to fail.
Install tensorflow on said environment: It does not fucking work, not detecting cuda, the only requirement? To have the cuda dependencies installed, modified, and inside of the system path, check done, it works on 4 other fucking environments, so why not this one.
Still doesn't work, google around and found some thread on github (the errors) that has a way to fix it, do it that way, fucking magic, shit is fixed.
Very well, tensorflow is installed and detecting cuda, no biggie. HAD TO SWITCH TO PYHTHON 3,8 BECAUSE 3.9 WAS GIVING ISSUES FOR SOME UNKNOWN FUCKING REASON
Ok no problem, done.
Install jupyter lab, for which the first in all other 4 environments it works. Guess what a fuckload of errors upon executing the import of tensorflow. They go on a loop that does not fucking end.
The error: imPoRT eRrOr thE Dll waS noT loAdeD
Ok, fucking which one? who fucking knows.
I FUCKING HATE that the main language for this fucking bullshit is python. I guess the benefits of the repl, I do, but the python repl is fucking HORSESHIT compared to the one you get on: Lisp, Ruby and fucking even NODE in which error messages are still more fucking intelligent than those of fucking bullshit ass Python.
Personally? I am betting on Julia devising a smarter environment, it is a better language already, on a second note: If you are worried about A.I taking your job, don't, it requires a team of fucktards working around common basic system administration tasks to get this bullshit running in the first place.
My dream? Julia or Scala (fuck you) for a primary language in machine learning and AI, in which entire environments, with aaaaaaaaaall of the required dlls and dependencies can be downloaded and installed upon can just fucking run. A single directory structure in which shit just fucking works (reason why I like live environments like Smalltalk, but fuck you on that too) and just run your projects from there, without setting a bunch of bullshit from environment variables, cuda dlls installation phases and what not. Something that JUST FUCKING WORKS.
I.....fucking.....HATE the level of system administration required to run fucking anything nowadays, the reason why we had to create shit like devops jobs, for the sad fuckers that have to figure out environment configurations on a box just to run software.
Fuck me man development turned to shit, this is why go mod, node npm, php composer strict folder structure pipelines were created. Bitch all you want about npm, but if I can create a node_modules setting with all of the required dlls to run a project, even if this bitch weights 2.5GB for a project structure you bet your fucking ass that I would.
"YOU JUST DON'T KNOW WHAT YOU ARE DOING" YES I FUCKING DO and I will get this bullshit fixed, I will get it running just like I did the other 4 environments that I fucking use, for different versions of cuda and python and the dependency circle jerk BULLSHIT that I have to manage. But this "follow the guide and it will work, except when it does not and you are looking into obscure github errors" bullshit just takes away from valuable project time when you have a small dedicated group of developers and no sys admin or devops mastermind to resort to.
I have successfully deployed:
Projects, and every single fucking time (save for .net, that shit just fucking works on a dedicated windows IIS server) the shit will not work with x..nT reasons. It fucking obliterates me how fucking annoying this bullshit is. And the reason why the ENTIRE FUCKING FIELD of computer science and software engineering is so fucking flawed.
But we can't all just run to simple windows bs in which we have documentation for everything. We have to spend countless hours on fucking Linux figuring shit out (fuck you also, I have been using Linux since I was 18, I am 30 now) for which graphical drivers for machine learning, cuda and whatTheFuckNot require all sorts of sys admin gymnasts to be used.
Y'all fucked up a long time ago. Smalltalk provided an all in one, easily rollable back to previous images, easily administered interfaces for this fileFuckery bullshit, and even though the JVM and the .NET environments did their best to hold shit down, and even though we had npm packages pulling the universe inside, or gomod compiling shit into one place NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO we had to do whatever the fuck we wanted to feel l337 and wanted.
Fuck all of you, fuck this field, fuck setting boxes for ML/AI and fuck every single OS in existence2
What's that? No ints? Use parseInt or Math.floor.
What are you saying? == works in strange ways? Yes, that's what we have === for.
Type coercion is wonky? Think it's weird how string + int works differently than string - int? Wanna string with number + - + - - + - - etc? Don't! Don't add strings and ints, don't subtract strings and ints. You can't in statically typed languages and you aren't supposed to in dynamically typed
Adding arrays and objects, arrays and arrays, objects and objects etc. is inconsistent? Why are you trying to do that?
Adding floats together gives odd results? Now we're getting somewhere! And Mozilla responded to that with a method called toFixed.
Declaring variables with var doesn't always work that well? Use let and const
Then there's this weird attitude that some people I've met have, where they will complain about the module system and how "well you rely on the community for those packages" as if it's a bad thing. And then coming with the "well you don't know what the (open source) packages do internally" as if I (for the most part) give a shit. Then they'll swear by companies like Zend or Microsoft as if they can't just stop supporting the languages they use. Maybe it's just because I like community content more because of video game mods.
Wanna criticize JS, then there's plenty to talk about. Like the built in date object is basically shit. Or how in NodeJS you can have node_modules in your node_modules. Or how classes don't really have the best syntax. Left-Pad. And so on (it's too late for me to be able to remember much more).1
I just wanted to create a simple React project with Sass: 118 MB. Ow. Well...
React himself is just 116 KB.2
Fire your whole fucking web team Bethesda
* Your design is a classic ipecac. Whatever the fuck you are doing doesn't in frontend doesn't justify the 4Mb of bandwidth I wasted on a single js file. Why the fuck can I see the whole fucking node_modules directory when looking at the sources?
I know this is supposed to be a webpage for a game development studio, but I'm seriously wondering if your budget would even get me a prostitute.
I'm a greedy fuck and want a free game. apparently your servers are only good enough to register me, but login is apparently too much to ask for. Yeah sure. Oh and also thank you for choosing an "incorrect username and password" error message by default, even though your fucking gateway timed out. Please be kind enough and punch me directly into my face next time. Not like I'll ever access that shit ever again3
Learning Angular, starting with a hello world example:
$ ng new wtf
added 1180 packages from 1294 contributors and audited 21849 packages in 18.753s
found 13 vulnerabilities (9 low, 4 high)
Oh, great! Broken from the get-to! But wait, there's more joy!
$ vimdiff wtf/node_modules/is-odd/node_modules/is-number/index.js wtf/node_modules/is-number/index.js
Fresh project, is-odd requires is-number, the project itself requires is-number. And is-number is there twice in two different versions. The notion of a number must have changed drastically in the last couple of years!
Seriously? Angular doesn't even give me the chance to fuck up the dependencies on my own!7
Yep, this is definitely a node_modules folder. There‘re no other objects in the universe containing that much files.3
Just cleaned up my legacy projects directory. Deleted all node_modules, bower_components, and distribution directories.
Deleted hundreds of thousands of files, freed up like two gigs 😑1
Why has web development become so complicated?
I'm learning React with JSX . Why is JSX even necessary? HTML works fine. Its simple and gets the job done.
I can't stand the node_modules directory either. Opening it up reveals what seems like hundreds it not thousands of dependencies that all have their own recursive node_modules folder and the dependencies continue.
Why are we creating more unnecessary abstractions on top of more unnecessary abstractions? What happened to K.I.S.S?
First rant from my new job.
I got a position as backend-dev in a startup and for now i'm learning angular. Yes, you read that correctly, because the frontend-team is short-staffed i decided to switch teams. We are 3 people and neither one has sufficient angular-experience (the framework was a management decision).
First of all i got confused because we use slack and trello but the frontend-lead decided to do some stuff via google-spreadsheet too. Then we didn't have any code in our repository until yesterday. I tried to check out the repository after that, did an npm-install but when running ng serve i got an error "css-file not found". It turns out you had to download some files from the official website and put them in the unversioned node_modules directory. It was the teamlead's decision to do so and me and my coworker got really annoyed when we tried to set up everything on our end. But that's not all, yesterday the other dev's merged their first versions of the project. But not via git, that is way to mainstream. The coworker had to upload his code into the cloud and the teamlead copied the files into the project folder.
Aside from that the code already isn't the best, some things should be done differently imo and we have credentials in the code (not in some separate files, but in an if-else-clause that checks node.env.production).
We'll have a discussion about this tomorrow, let's hope things can be straightened out.3
I don't like when depending on something, e.g. smoking or coffee, but
still have to carry on dependencies in node_modules.
When you node_modules (npm) and vendors (composer) folders account for 80% of your codebase size ...3
seconds into 2019
I see one incompetent fucker asking to eval in Node.js..
A FUCKING FETCH OF A NPM MODULES IN CDNJS
you know what's the reason?
Fucking kill me unless you're some dumb bitch who uses npm modules like some braindead motherfucker who doesn't know what a number is, node_modules takes only an average of 3.6MB
Compared to RubyGems who takes 40+
Seriously stop this. I wanna hang myself because my 2019 put me in a shit mood1
When "rm -Rf node_modules ; npm install " fixes things more often than it should. It's almost like "have you tried rebooting?"
security fiasco due to a malicious npm package:
Because of a bitcoin miner present in event-stream npm module (https://bleepingcomputer.com/news/...), my entire team and I had to scan all our nodejs apps, repos and the most excruciating one, all node_modules folders across all our dev machines and servers, to see if event-stream and flatmap-stream is present, then not just delete it but update a bu**load of upstream dependencies which internally used event-stream. All due to one malicious package which was hidden several layers beneath.
And, this happened almost 8 months after the aforesaid vulnerability was first found.10
CAN NODEJS KINDLY GO FUCK ITSELF?
well maybe not node itself, but those node js so-called "professional node developers"
WHO THE FUCK thought it was a good idea to pass about EVERY SINGLE ARGUMENT as a global variable so absolutely no code insights are available, eslint with THEIR eslintrc shows ABOUT ONE MILLION DIFFERENT LINTER WARNING and on top they commited the node_modules folder
just realised that "have you tried to `rm -rf node_modules/ && npm i` is the js adaptation of "have you tried turning it off and on again".1
So my IT teacher wrote his own web server framework for NodeJS and he forces us to use it for assignments. Would be fine if:
1. It worked properly.
2. It had any kind of documentation.
3. He knew how it worked.
But no, we have to debug his shit and edit the js files in node_modules to get shit working.
Is he open to suggestions? Not really. If you have a fix, you have to create a gitlab account and send a pr. Even if you tell him what exactly is wrong. He won't do anything about it.
Why use express when we can learn something we'll never use again?
At this point I think we're using it only so that he gets downloads on npm.
Oh ya, he also copies package.json from project to project instead of creating a new one with up to date dependencies.
I look like a hacker when I forgot to add .gitignore for my node_modules pushing my code to github.3
Can someone explain the node_modules joke to me please? I've seen it quite a bit now, but I still don't get it. (Attached an example from https://devrant.com/rants/760537/...). Thanks in advance.5
I've spent a lot of time messing around with C, having struggled with object-oriented programming (due to not really knowing how best to structure things, not knowing when to apply certain design patterns).
When writing C code, I'd write OOP-esque code (pass around a struct to routines to do things with it) and enjoyed just making things happen without having to think too much about the overall design. But then I'd crave being able to use namespaces, and think about how the code would be tidier if I used exceptions instead of having every routine return an error code...
Working with Python and Node over the past couple of years has allowed me to easily get into OOP (no separate declaration/definition, loose typing etc.) and from that I've made some fairly good design decisions. I'd implemented a few design patterns without even realising which patterns they were - later reading up on them and thinking "hey, that's what I used earlier!"
I've also had a bit of an obsession with small executable files - using templates and other features of C++ add some bloat (on Windows at least) compared to C. There were other gripes I had with C++, mostly to do with making things modular (dynamic linking etc.) but really it's irrelevant/unreasonable.
And yes, for someone who doesn't like code bloat, working with Node is somewhat ironic... (hello, node_modules...)
So today I decided to revisit C++ and dust off my old copy of C++ in a Nutshell, and try to see if I could write some code to do things that I struggled with before. One nice thing is that this book was printed in 2003, yet all of its content is still relevant. Of course, there are newer C++ standards, but I can happily just hack away and avoid using anything that has been deprecated.
One thing I've always avoided is dynamic_cast because every time I read about it, I read that "it's slow". So I just tried to work around it when really if it's the right tool for the job, I might as well use it... It's really useful!
Anyway, now I've typed all this positivity about C++ I will probably find a little later on that I hit a wall with what I'm doing and give up again... :p7
I'm no Nodejs expert but can someone explain how in the fucking world is node_modules folder is that HUGE! on my slow ass internet it takes couple of mins to pull the repo and five mins to finish npm install! and takes so much ram to build a freaking docker container for my react website when it takes barely 300MB to build both MySQL and Asp.Net Core dockers T_T7
I legit had this dream early morning today.
A bunch of kids (grade 10ish) were stuck somewhere and helicopters had been sent in for rescue. Strings were thrown down to airlift 'em and just like that, one kid was being pulled up. Everyone was horrified to see that the strings were giving way for just this kid while the others were being pulled up easily. The rescue team attempted the act multiple times but no go.
After all the hullabaloo it turned out that the pen-drive in his pocket had a node_modules folder. Deleting it made him lighter and that saved his life omg. :')
I don’t know why/how, but some guy in my team put the node_modules folder on GitHub.
This person ran *npx create-react-app* and for whatever reason probably DELETED the .gitignore.
I had to fix it of course, and in the meanwhile I forgot to switch branches before changing everything, making git crash because switching branches with +4 million lines of code deleted was too much.
Why don't they let experienced front-end devs initialize projects? I don’t understand.8
Holy crap, just ran npm install on the vueJS webpack template. node_modules is 272.7mb with 21785 items :/6
$ rails new [old side project but this time I will finish it (sikes)]
$ cd [project]
[ Inserting "gem 'webpacker' ~> '3.0.0'" in Gemfile ]
$ bundle install
$ rails webpacker:install
$ rails webpacker:install:react
node_modules weights 97.4 mo 🙄3
When syncing node_modules via nfs to Vagrant it's an even better excuse than 'it's compiling' - it literally takes 2-3 hrs and the ssd request is pending for over a month now. Looks like nobody sees it as an issue...1
When your technical skills section starts to look like a a node_modules directory, it’s time to edit.
Do you have 1000000000 node_modules folders and no space on your machine? This command will help. Just NPM install in the folders you actually use:
rm -r **/node_modules6
Finally made my node production server stable enough that I could focus on writing tests*. I start by setting up docker, mocking cognito, preparing the database and everything. Reading up on Node test suites and following a short tut to set up my first unit test. Didn't go smoothly, but it's local and there are no deadlines so who cares. 4 days later, first assert.equal(1+1, 2) passes and I'm happy.
I start writing all sorts of tests, installing everything required into "devDependancies," and getting the joy of having some tests pass on first try with all asserts set up, feels good!
I decide to make a small update to production, so I add a test, run and see it fail, implement the feature, re-run and, it passes!
I push the feature to develop, test it, and it works as intended. Merge that to master and subsequently to one of my ec2 production servers**, and lo and behold, production server is on a bootloop claiming it "Cannot find module `graphql`". But how? I didn't change any production dependencies, and my package lock json is committed so wth?
I google the issue, but can't find anything relevant. The only thing that I could guess was that some dependencies (including graphql) were referenced*** in both, prod and dev, and were omitted when installed on a prod NODE_ENV, but googling that specific issue yielded no results, and I would have thought npm would be clever enough to see that and would always install those dependencies (spoiler: it didn't for me).
With reduced production capacity (having one server down) I decided to npm uninstall all dev dependencies anyway and see what happens. Aaaaand it works.....
So now I have a working production server, but broken local tests, and I'm not sure why npm is behaving like this...
* Yes I see the irony.
** No staging because $$$, also this is a personal project.
*** I am not directly referencing the same thing twice, it's probably a subdependency somewhere.2
@ everyone who keeps pushing Vue via node
Vue via npm:
- bundling so you can save 15% on car insurance
- webpack/etc to condense your 50TB node_modules folder
- have to deploy, if you're in the US then it'll probably be in the middle East or maybe North Korea if that falls out
Vue via script tag:
- works awesome
- pretty feckin fast
- can be deployed purely static
- easy debugging from dev console
- easy templating for frontend
- can use existing html/css
- easy to work in teams with people without having everyone install npm
- if you have a designer they will love you for making it easy to style things
- you can cache it and make it offline without any of the new bullshit vuex
- you can use vanilla libraries without a mixin, polyfill, bundler, or etc anus
!rant - well maybe
I really wonder what is going to be the end product concerning Deno and TypeScript when it deals to managing dependencines. Thus far the general idea is to have a deps.ts file for which the dependencies required are fetched through a url, cached into the project and then imported from that file onwards.
This seems interesting to me, and I would venture to say that it eliminates some of the pain points from running Node applications, we all know about the dread caused by overly large node_modules folders, but would y'all say this is the right approach? rather than stopping people from generating a large pool of dependencies, it seems that the issue would continue to persist, but it would just come from the internet during runtime rather than from living in the file system of the application.
Either way, I still remain a big fan of Ryan Dahl and his creations and can't wait to see Deno stable enough to test out on a couple of projects.2
Had our 3rd party vendor finally check their code into our github. Great.
Checking the recent commits, they only add changed .CSS files. Hmm..odd.
We use less so why did they update the compiled CSS file...? Did they forget to checkin the Less changes...?
Nope. Backend sitecore developer updated the bundled, minified CSS files and checked those in along with the fucking node_modules folder.
Didn't even know what LESS is.
The vendors PM swears the frontend developer did the changes. I don't know what's worse.
We all know that node_modules is the heaviest folder in the whole universe, right?
Weel now that I'm starting to use ionic and cordova I get to use them for apps as well, not only websites!
Fuck my life, seriously8
npm waited for me to `rm -rf node_modules` and decided to experience an outage a MINUTE afterwards.1
Just noticed that my Recycle Bin had about 130 MB of stuff in it. Peeked in and I soon found out why.
Turns out I didn't hit Shift + Delete when deleting node_modules from a React project...3
I'm using git bash on Windows 10, tried WSL, but it is really messed up needs more documentation, i had multiple installs of node js and other stuff including node_modules
So using git bash, I have my own sweet .bashrc file which is awesome, using bash or WSL is kinda slow, just wanna know how you devs have set up your terminals.4
Ah, npm... Lots of packages use ES6 syntax because it's nice to write, and then transpile to node-compatible code either with CI or a precommit script. Just spent a whole day trying to figure out what was wrong with my project, when it turns out I just had to tell webpack to ignore node_modules *except* for this specific package. Sigh.2
Do you ever set up a project too small to justify using any real framework and you end up creating .gitignore by hand and typing 'node_modules' in it like a caveman?4
OK, I'm at a new internship and new to node development. I'm consulting the existing repositories to see what's already existing, but... node_modules shouldn't be in the git repository, right?3
Saw a git repo that contains the node_modules folder and some dependencies and was wondering how'd fuck did this guy get this up here.... Mehn some devs can be super powerful(funny)
I was the first person to actually discover how a black hole looks like. And i can prove it. node_modules/
So, I have worked with two different package managers. Sbt and npm. And I don't get them. Let's take npm. I install a module. That module has its own package.json and npm runs for that, too. And it drops it into the same node_modules directory, just like the modules of my main application.
Sbt constantly gives me warnings about possible binary incompatible versions and I have to exclude packages and hope that those packages work together nicely.
I don't get it. This is how I would build a package manager and please tell me if I am just naive or why it is not done like it.
1. All packages get their own namespace, consisting out of the namespace and the version in a global folder.
2. If a submodule has installed a package in version 1.5, then it will be symlinked to that package. If another submodule needs 2.5, it is symlinked to the 2.5 version.
3. If I want to minimise the build I can try to override the packages to see if they are still working when they are all given the same version.
Seems pretty simple to me. So why the fuck are those package managers constantly loading everything in a global namespace not differentiating it by version?8
ln -s **/node_modules/bin ~/.node_modules/
...proof that Satan is real and also that he has push access to this git repo
In what nightmare world does this work and/or is it a good idea
Yes, thanks you, IntelliJ, how did you know I wanted to set the fucking NODE_MODULES folder as my fucking KOTLIN SOURCES ROOT every time I hit Gradle refresh?
I worked directly in my Github repo folder while working on a project (don't ask me why). I did my initial commit with all my code from the start until 5 hours ago. I never pushed.. A minute ago, I checked my commit and noticed that there were DB credentials in one of the files. So.. Smart me.. "revert commit"..
Result. Everything got deleted except my node_modules folder and the readme file.. I lost everything.. Fuck me, I'm going home..
Please, someone.. Can I get these files back via git or something? Can't find anything in in the history..9
Hey guys passport authentication seems so cool in node, its a little bit hard to learn though...i will work on it today and try to create a demo project on it :) , traversy media has this great tutorial on it2
With all of those change request features, I might as well charge you by the bytes in my node_modules alone.1
Post Mortem: Yarn Workspaces
So yarn workspaces are fucken sick, i love them. As long as you don't want to deploy your shit, because your api most certainly needs node_modules, your vue frontend doesn't...
Today I figured out how to cache the 'node_modules' folder on all my CircleCI builds, which cut the build time by 4 minutes, about 60%!
$ git clone some/shit.git dir
$ cd dir
$ npm install
[literally ages later]
$ du -sh node_modules
So yeah, need money so I started looking for extra projects to develop and found a project to make "the new facebook" and it just kinda sucks.
I just got access to the whole codebase and it's done using angular, nodejs and typescript (which is cool to me), while the dude contacting me was telling me it was done in react (which is kinda a big no for me).
Well, anyway, I start by cloning the repo and the npm-i the whole thing, it's not even at 10% of the whole process and I already got like 50 deprecated packages over maybe a hundred needed (total of 2054 node modules installed).
Well I kinda don't even know where to start from this, all I know is that I'm gonna do it just for the money so I'll be a little underpaid (about 500$/month) while according to me the price should be about 1500$/month, but I can't do it full-time, so it kinda works out.4
Say what you want about npm and node_modules, it is much better than other package management systems like pip.
Least I don't need to create an entirely new installation of nodejs every time I want to build something new that might depend on some packages that depends on an 0.0.1 version lower of another package that is used by a different project I currently have to also maintain.
P.s. I do love python overall and it's ecosystem, the package management and version control are sheer garbage.2
Yarn install. It’s simple enough and I understand why it’s used but it’s just annoying having to install 150MB of stuff to be able to produce a 200KB output is file. There must be a better way?1
Writing a library is so much nicer than writing an app. You can concentrate on the core thing you want to achieve and need to handle just a few files.
And you can still test it live even if it's a node module: just symlink it into the node_modules folder of your app.4
I'm really frustrated by the size of node_modules folder that gets created every time for every project. So, I've been looking for some time-space saving solutions. And I found PNPM ( https://pnpm.js.org/ ) , Yarn ( https://yarnpkg.com/ ) and Pkglink ( https://github.com/jeffbski/pkglink ). But I'm not sure which is better to serve my purpose.
Things I'm looking forward to solving:
1. I don't want to re-download the same packages over and over again
2. I don't want the same packages to be in multiple projects and eat up space
3. I want a stable, fast and disk space saving solution
Looking for experts advice.7
Why TypeScript and Angular2 encourages you to link scripts directly from node_modules folder? What happens when you move the project to server(you know...the place that doesn't know about that folder). And how's the bundling gonna work?5
I was reviewing an Angular (remember this) project where I work to find any possibilities to optimize the performance of app. For a moment an idea came to me to look and analyze package.json and see if there is any package listed there but it's not being used in the application.
...aaaandd there were fucking 32 unused packages. 32 packages that have been installed but are not used anywhere in the application. 32!!!!!
And you know what the best part is. 2 of them were react packages. I mean, literally, their name was react-bllabllablla- component, and when I visited npmjs website, their description was react component that does bllabllablla. It's fucking react....... It's in the name, it's in the description. Is my company giving jobs to fucking blind developers or what? I'm going crazy!5
When the projects repository has node_modules/, and you need build styles:
rm -rf node_modules/*
rm -rf node_modules/*
git checkout node_module/3
So I made a gulpfile.js boilerplate for starters with minimum node_modules as possible, I'd like if someone reviews my work : here's the link
To hell with this auto path rewrite VS Code, when I rename a file you find all files and rewrite the imports, but now you did it wrong
and I have a huge mess to pick, I have no idea how you did this but you wrote long paths which don't make sense
why did you put node_modules in-front of all my imports when I moved a folder which has nothing to do with node modules1
The things that make me wanna hate React Native is that the project folder becomes so BIG, makes it so hard to remove the whole project folder, including node_modules.
I really hate Dart but liking Flutter only because the project folder - along with the necessary code gets created pretty faster than React Native. On the other hand, React Native takes ages to load all the node_modules.
So, I'm asking the experts here, who have worked in both frameworks, should I leave RN and go for Flutter?
Cause, I don't wanna waste a handful of time every time just to create a RN project.
If I should stick with RN, please tell me a way so that I don't have to waste the time just to create a RN project.
Heroku logs be like
2018-07-16T00:05:06.883023+00:00 app[bot.1]: Ready!
2018-07-16T00:05:11.940150+00:00 app[bot.1]: (node:4) UnhandledPromiseRejectionWarning: Error: 410 Gone
2018-07-16T00:05:11.940171+00:00 app[bot.1]: at _response.transport.request.then (/app/node_modules/snekfetch/src/index.js:193:21)
2018-07-16T00:05:11.940173+00:00 app[bot.1]: at <anonymous>
2018-07-16T00:05:11.940175+00:00 app[bot.1]: at process._tickCallback (internal/process/next_tick.js:188:7)
2018-07-16T00:05:11.940248+00:00 app[bot.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated
either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2018-07-16T00:05:11.940340+00:00 app[bot.1]: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
HELP: yesterday I discovered why my Gradle build takes so fucking long every time, but I still don't know how to fix it. for some reason, it sees the node_modules folder as NEVER "up-to-date", and so every single time I run 'gradle war_exploded' it copies the entire node_modules folder into the war, even of nothing has changed. any ideas?2