A flat node_modules directory is probably the thing that @npmjs did that has annoyed me the most. So many broken packages because they don't list their dependencies and rely on the flat install
-
-
Replying to @jsumners79 @npmjs
The flat tree is definitely less human friendly, but I’ve never seen packages rely on this. I mean, how would package author A know which other packages you might have installed. Sounds more like a peer dependency problem to me
2 replies 0 retweets 0 likes -
In one module, and in my naivety (but also for good reason, it was an edge case scenario, but also, bad idea and it was 4+ years ago) I did a require(‘../../package.json’) which broke when npm went to flatten deps
1 reply 0 retweets 0 likes -
Use
@pnpmjs to install the `heroku` package and then try to run `heroku —help`. Also, there was a bug in `clinic-flame` last week due to the same problem. I suppose people look in their modules directory, see the deep, and figure it’s okay to use it2 replies 0 retweets 1 like -
Replying to @jsumners79 @davidmarkclem and
It’s worse than that. I write a test and I use a dependency - I need to make an effort to check if it’s in package.json or not. This is a problem that could easily solved by tooling, I’m surprised anything has been written yet.
5 replies 0 retweets 2 likes -
Replying to @matteocollina @jsumners79 and
Pretty sure
@yoshuawuyts already did write something for that ages ago (or if not wrote it, used it)1 reply 0 retweets 1 like
yosh Retweeted Thomas Watson
I think @wa7son's suggestion might be what you saw me use too
https://twitter.com/wa7son/status/1103430094461247488?s=19 …
Tho tbh this feels like something that should be solved at the npm/node layer.
yosh added,
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.