DEV Community

Discussion on: What interesting things I can do with npm?

Collapse
 
bgadrian profile image
Adrian B.G.

My last uses of the npm were

  • lose 3 days to make a project work (because of x dependencies random errors)
  • spend hours and hours to "debug" errors like "undefined"
  • eat popcorn while browsing NPM's source and see how to not write code
Collapse
 
theoutlander profile image
Nick Karnik

Often this is the case when starting out. You may run into permissions issues too. I still think it is better than pip or gem any day.

There’s a running joke that half the bandwidth on the internet is used by Netflix and the other half by npm. :D

Collapse
 
bgadrian profile image
Adrian B.G.

I am a senior JS developer, I can find out why the script failed, but the code is so badly written that it takes tens of minutes to do the research. Also using a framework like Meteor (or other layer on top of node) adds a new layer of problems.

I found many issues on Github related to most of the problems I had, the problem is that many of the NPM developers (including the NPM contributors) only care about their local system, they do not use error handling and other common mistakes.

Most errors are "undefined at ..." because ... defensive programming, asserting and other techniques are obscure.

Of course, I cannot complain because they are for free :))

Thread Thread
 
theoutlander profile image
Nick Karnik • Edited

Sorry, I misunderstood earlier. What you said makes sense. I’ve had package specific issues a handful of times only. Maybe, I’m too conservative installing random packages. However, I tend to look at the popularity and star count before considering most packages. Anything less than popular, I start by looking at the issue tracker and code in some cases.

Are you still using Meteor? Is it phasing out?

Thread Thread
 
bgadrian profile image
Adrian B.G.

Unfortunatelly the stars does not mean they work on windows πŸ˜€

I will not use Meteor ever again, is very proprietary, dependant on weird outdated packages and adds a thick layer of complexity that can be easily avoided.

It is very good for prototypes, proof of concepts and hackatons, after that it only gets worst.

Collapse
 
giorgosk profile image
Giorgos Kontopoulos πŸ‘€

Also node_modules folders probably uses half of the GB of a developers hard drive ;-)

Collapse
 
jochemstoel profile image
Jochem Stoel

Anything less than popular, I start by looking at the issue tracker and code in some cases.

I used to do that but over time found that sometimes you need something very specific, hasn't been downloaded in weeks and only starred by the author that is a perfect unopinionated and applauseworthy documented.

Also the more people involved the more they pollute it with opinions and distractions. I don't mean that applies universally but look at what we did to JavaScript.

Collapse
 
antonrich profile image
Anton

There is a new kid on the block. His name is Turbo. But I'm not familiar with neither npm nor with Turbo. I'm relying on you guys to check it out and tell me if it's stupid or not.

Collapse
 
kiranjd profile image
kiranjd

I'm on the same boat. 2 days in and still hasn't been successful resolving dependencies

Collapse
 
bgadrian profile image
Adrian B.G.

I solved it by moving the project to Linux. Most of the issues were lower lvl libs.
Also copy pasting parts from dependencies into project and removing them.
You solve chaos with chaos πŸ˜€

Thread Thread
 
kiranjd profile image
kiranjd

I don't have the option to move it to Linux. I guess I have to go through this tedious process.

Thread Thread
 
theoutlander profile image
Nick Karnik

Why don’t you try docker?