-
Notifications
You must be signed in to change notification settings - Fork 3k
3.2: npm install completes before complaining about missing package.json #9113
Comments
A missing |
Are you seeing it actually stop your install from working? |
hi.. yes, it stops the install from working.. move into an empty directory, then:
|
the previous output was from npm 3.2.1 |
hmm...
So it seems to (mostly) work for me. It installed all the files correctly. The one thing it didn't do was list the module as being installed at first. @75lb Could you try again with |
First, I believe this npm indicates failure because exists with 1: https://gist.github.com/3869151ee7e5a0cc4911 Yes, the files get installed correctly. You get the same error (as well as the This is master (1fa9169) which happens to be npm 3.3.0 |
That's interesting - on another box (also running FreeBSD) but with node v0.12.7 I don't get an The log comes from FreeBSD box running io.js 3.0 node 0.12.7 configuration:
iojs 3.0 configuration (it's debug):
|
@iarna ok, this time i used npm@3.3.0.. here is the some more output:
|
Here's silly log from me: https://gist.github.com/1c9e0ce9bce103670da7 |
-- it seems to me that both machines fail now the same way:( |
Ok, so this is caused by two things, but the biggie is column-layout being required by one of its own deps: column-layout → command-line-args → command-line-usage → column-layout This confuses the logical tree generator… |
Nobody promised that dependency graph is a tree :) and the little one? |
¯_(ツ)_/¯ I don't honestly know where I was going w/ the little one thing. And no, no one imagines our dependency graphs are always trees, this bug had to with how orphan package status was computed when we were transforming a physical tree (representing the folders on disk) into a logical tree (representing the dependency graph). Orphans being packages that, when you look up at the things that depend on them and the things that depend on those, never ends up depending on the root level module. Basically it was checking to see if something was orphaned by seeing if anything depended on it. If nothing depended on it then it grafted it on to the root of the tree. But of course, with a dependency cycle that means that everything in that cycle is depended on by something, without ever connecting to the root. As such, we weren't attaching them to the root of the tree. Fortunately, we keep track of modules the user installed and modules that are otherwise unaccounted for and so we can look at that to determine if the module should get grafted back to the root. |
in npm 3.2, installing a package to a project without a package.json fails (ENOENT package.json).. but it performs all network/downloading first..
i work remotely on mobile data plans so pulling a lot of data, only to be told it failed, seems inefficient..
is it possible to test for package.json presence before tanning the network?
The text was updated successfully, but these errors were encountered: