spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

npm WARN install Refusing to install spdy as a dependency of itself #272

Closed jovo123 closed 7 years ago

jovo123 commented 7 years ago

Hi! So I am trying to run the server.js code But I get the following error.

`$ node server.js module.js:327 throw err; ^

Error: Cannot find module 'spdy' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (/Users/jvo/InternProject2016/server.js:1:74) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10)`

The solution that I've found is that I need to use npm to install spdy. But why I try this I get the following:

$ npm install spdy npm WARN install Refusing to install spdy as a dependency of itself

I have version 4.5.0 of node.js. Has anyone encountered this? Or perhaps has a solution?

My guess is that it's trying to install the spdy module in node-spdy/lib/spdy, and npm doesn't like that. I could try to rename the folder and refactor the code myself but I was hoping there was another solution.

acorncom commented 7 years ago

@jovo123 Did you figure out your issue on this? If so, might be good to close this issue ;-)

ghost commented 7 years ago

Try upgrading node version to >=5.0

jovo123 commented 7 years ago

I no longer have access to the machine that I was having this issue on. So I'll close the issue! Thanks for the responses... hopefully upgrading node works fine.

w01fgang commented 7 years ago

If your project's name in package.json is spdy of course you will see this message: Refusing to install spdy as a dependency of itself