juliangruber / stream

Node.js streams in the browser
62 stars 33 forks source link

NPM@3 causes unwanted module overwrite #4

Closed JoshuaWise closed 8 years ago

JoshuaWise commented 8 years ago

Before NPM version 3.0.0, I could use modules that require()'d this module, and then go ahead and use the Node core stream module all I wanted. But now in NPM@3, the entire dependency tree is installed as flat as possible in the node_modules folder. This means that if I use a module that uses this module, I can no longer use the native stream module anymore, because this one overwrites it. I did not put this module in my package.json as a dependency, an yet I am forced to use it. This should NOT be possible. If it's important to provide mirrors of the Node core modules in NPM, they should be under a different name. This wouldn't cause any problems, but it would solve this one.

juliangruber commented 8 years ago

I cannot reproduce this problem. I create a new node project that only depends on this module, and in whichever node / npm version i run npm install and then try something like console.log(require('stream')) I always get the node core module.

JoshuaWise commented 8 years ago

Closed. This bug was being caused by a custom-hacked version of NPM at my office. Sorry.