Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Duplicate, mismatched modules on npm #68

Closed
callum opened this issue May 7, 2015 · 38 comments
Closed

Duplicate, mismatched modules on npm #68

callum opened this issue May 7, 2015 · 38 comments

Comments

@callum
Copy link

callum commented May 7, 2015

screen shot 2015-05-07 at 17 39 54

Browserify looks for a specific version of JSONStream here https://github.com/substack/node-browserify/blob/master/package.json#L48

Is there a case sensitivity issue going on? This happened after upgrading node and npm. It fails on install because it tries to install JSONStream and not jsonstream where the version is less than specified by browserify.

@jwhitehorn
Copy link

+1 just ran into this as well

@callumacrae
Copy link

same

@jgoz
Copy link

jgoz commented May 7, 2015

This wreaks havoc on Windows/case insensitive filesystems when JSONStream and jsonstream are both dependencies. The npm cache gets populated with one of these and then it can't find the other.

My recommendation would be to cross-publish all versions to JSONStream and jsonstream until the former is no longer a common dependency.

Apparently my recommendation isn't possible due to changes in npm.

@danemacaulay
Copy link

+1

@ghost
Copy link

ghost commented May 7, 2015

👍 I can no longer install cucumber that depends on browserify.

@danemacaulay
Copy link

this is not a problem in linux environments, think @callum is right about case sensitivity. fails on osx here.
i believe a resolution would be to remove the older JSONStream from the npm registry

@andrewevansmith
Copy link

Is there anything we can do in the meantime? It affects cordova and phonegap as well.

@danemacaulay
Copy link

i used a linux vm to install the dependencies

@ghost
Copy link

ghost commented May 7, 2015

Upgrading to the latest browserify solved it for me. Here is what they have done: browserify/browserify#1247. I guess each package that depends on JSONStream should do that dependency update.

@zertosh
Copy link

zertosh commented May 7, 2015

browserify@10.1.2 won't have this problem. it seems to only affect 5.0.0-10.1.1. But cross-publishing doesn't seem to be possible because JSONStream (w/ caps) isn't updatable npm/npm#7195

@cmmcleod
Copy link

cmmcleod commented May 7, 2015

+1

3 similar comments
@teddyhwang
Copy link

+1

@butterdave
Copy link

+1

@lalehstp
Copy link

lalehstp commented May 7, 2015

+1

@mlakhia
Copy link

mlakhia commented May 7, 2015

+1. Updating browserify to 10.1.2 solved the issue for me

@jwhitehorn
Copy link

Updating browserify works, but other dependencies like grunt-browserify are still effected.

I tried doing an npm install from a case-sensitive OS X disk image, but that still didn't resolve this issue for me.

@carbontwelve
Copy link

This has stopped elixir from installing as well as reported here http://laravel.io/forum/05-07-2015-elixir-wont-install?page=1

@ckrotcov
Copy link

ckrotcov commented May 7, 2015

+1

1 similar comment
@stephenliberty
Copy link

+1

@calvinmetcalf
Copy link

JSONStream is a weird case because it has capitals which are no longer allowed but it seemed to have been grandfathered in, the JSONStream/jsonstream thing has been around for a while and previously didn't cause any issues

@dominictarr
Copy link
Owner

I can't remove JSONStream, that would break thousands of modules.

I had to publish jsonstream because npm broke my ability to update JSONStream npm/npm#7195

They have been saying they would fix it, so that legacy uppercase modules could still publish, but not new modules (this had been the behavior for a long time, until just recently...)

I was then unable to publish new versions of JSONStream, however, pull requests where coming in,
so eventually, due to popular demand I published it as jsonstream #59

this this happened. so far there are only 8 things that depend on jsonstream (though, one of them is browserify, which everyone uses)

@TheSharpieOne
Copy link

Looking at npm/npm#7195, the validation is all done in npm and not on the server (as they were discussing adding server side validation). Based on that, would it be possible to install an older version of npm to push up an update to JSONStream to cross-publish?

@zertosh
Copy link

zertosh commented May 7, 2015

To @TheSharpieOne's point... The validation seems to happen here

Though I don't know if it's right for @dominictarr to patch his npm so he can publish.

@dominictarr
Copy link
Owner

Okay I published JSONStream at 1.0.2 and 1.0.3 does this still happen?

@zertosh
Copy link

zertosh commented May 7, 2015

@dominictarr IT WORKS!!!!

@danemacaulay
Copy link

thanks 👍

@vmlellis
Copy link

vmlellis commented May 7, 2015

Thanks!

@TheSharpieOne
Copy link

Crisis [mostly] averted!

@ghost
Copy link

ghost commented May 7, 2015

Great! :)

@zertosh
Copy link

zertosh commented May 7, 2015

You get these warnings on OS X, but browserify works:

npm ERR! missing: jsonstream@^1.0.3, required by browser-pack@4.0.3
npm ERR! extraneous: JSONStream@1.0.3 /Users/andres/Downloads/node_modules/browserify/node_modules/browser-pack/node_modules/JSONStream
npm ERR! missing: jsonstream@^1.0.3, required by deps-sort@1.3.7
npm ERR! extraneous: JSONStream@1.0.3 /Users/andres/Downloads/node_modules/browserify/node_modules/deps-sort/node_modules/JSONStream
npm ERR! missing: jsonstream@^1.0.3, required by insert-module-globals@6.4.1
npm ERR! extraneous: JSONStream@1.0.3 /Users/andres/Downloads/node_modules/browserify/node_modules/insert-module-globals/node_modules/JSONStream
npm ERR! missing: jsonstream@^1.0.3, required by module-deps@3.7.11
npm ERR! extraneous: JSONStream@1.0.3 /Users/andres/Downloads/node_modules/browserify/node_modules/module-deps/node_modules/JSONStream

@dominictarr
Copy link
Owner

okay next step is just to get browserify to go back to JSONStream

@zertosh
Copy link

zertosh commented May 7, 2015

@dominictarr Ok... I'll switch browserify and the various deps over now

@englercj
Copy link

englercj commented May 7, 2015

I'm now getting shasum errors, cleaning cache for jsonstream and JSONStream doesn't seem to help:

npm ERR! shasum check failed for /tmp/npm-31132-1afc4346/.../j/jsonstream/_attachments/jsonstream-1.0.3.tgz
npm ERR! Expected: 728544189438b7b9dd2184392581861ebabd9621
npm ERR! Actual:   ff2d49c4f479b5bbcdf9f9e56c841cf87f0efa1d

Note this seems to happen only when using our internal registry (NPMe). Is there some action I need to take to update our version of jsonstream?

@othiym23
Copy link

othiym23 commented May 7, 2015

@englercj If you can, upgrade to npmE 2.0.0, which has a fix for this issue (older versions of npmE just went ahead and lowercased all of the package names when the follower was replicating them, which is pretty obviously what's causing the problem here).

The easiest way to upgrade the npmE distribution is:

  1. back up /etc/npme
  2. back up the CouchDB files, which are in /var/lib/couchdb
  3. delete /etc/npme/.license.json
  4. cd ~/ && npm cache clear && npm install npme, which will do a full reinstall, prompt you for creds, etc
  5. sudo service couchdb restart

If that doesn't get you sorted out, or is impossible, drop a line to support@npmjs.com and we'll get you sorted out.

@ryanbahniuk
Copy link

Is there a plan here either with npm or with other packages that use JSONStream as a dependency? I know Browserify updated quickly (thanks for that), but my repo has multiple other dependencies that rely on this package. I'm sure I'm not alone here.

@rmg
Copy link

rmg commented Jun 19, 2015

@dominictarr it looks like the conclusion to all this is that JSONStream is the canonical form, correct? How about marking the 2 existing jsonstream releases as deprecated so that anyone using them gets notified?

@dominictarr
Copy link
Owner

done.

On Fri, Jun 19, 2015 at 7:44 PM, Ryan Graham notifications@github.com
wrote:

@dominictarr https://github.com/dominictarr it looks like the
conclusion to all this is that JSONStream is the canonical form, correct?
How about marking the 2 existing jsonstream releases as deprecated so
that anyone using them gets notified?


Reply to this email directly or view it on GitHub
#68 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests