ianunay / mock-node

A configurable mock server with an intuitive configuration management interface and a http api
https://medium.com/@i.anunay/mocknode-e338f793dba0
170 stars 11 forks source link

Dynamic routes not responding 'Standalone ' and 'npm local install' #5

Closed inakigarcia closed 8 years ago

inakigarcia commented 8 years ago

Hi.

I was trying Mock Node locally. I've created some stub routs successfully but I've created a dynamic one and my server does not respond. I'm getting the same problem with the sample default dynamic route. However using the version that is deployed in Heroku "https://mocknode.herokuapp.com/mocknode/" it's working fine.

Could it be a bug or am I doing something wrong?

In case yoy need more information I'll be happy to help.

ianunay commented 8 years ago

Hey,

The code running on heroku is the latest version of mocknode. I believe heroku is running the code on v5 node.

What is the node version that is running on your local ? Do you see any errors in the console ?

I have tested with v0.12 and it works.

inakigarcia commented 8 years ago

Hi.

I'm with v5.0.0. This can be the problem source then.

Thanks for your time!

Edit: I'm getting the same with other machine with v4.4.5. I'm not getting any message through console or Log viewer.

inakigarcia commented 8 years ago

Hi again.

I've tried with the previous version of server.js file and it works fine. Last changes can have any issue with newer node versions.

Hope it helps somehow.

ianunay commented 8 years ago

Hi,

Thanks for that. Can you tell me which version worked ? v1.2.0 ?

Or you checked-out a previous commit in git?

inakigarcia commented 8 years ago

Hi I went back to previous commit "links to logs " to "server.js" file it was on "May 16, 2016 ".

ianunay commented 8 years ago

Thanks,

The Sandboxing might be causing problems. I am on v5.4.1 and it works for me. I'll have to debug for v5.0.0 and below using nvm.

inakigarcia commented 8 years ago

Ok thanks to you!

ianunay commented 8 years ago

Hey I ran it on v5.0.0 and v4.4.5 using nvm on a fresh install and dynamic routes worked for me.

When you ran npm install did you get any errors in "node-gyp rebuild" of buffertools. This is one thing that I can think of causing an issue.

inakigarcia commented 8 years ago

Hi. Yes, I'm getting npm error with buffertools on npm install.

ianunay commented 8 years ago

Hey,

This is a common problem with node-gyp: https://github.com/nodejs/node-gyp/issues/809

Its because there is OS version of gyp which interferes during the build.

I'm on Ubuntu and after doing this: sudo apt-get remove gyp , it worked for me

Let me know if this worked for you , I'll put this up in the troubleshooting section of the README.

inakigarcia commented 8 years ago

I'm with Windows 7, it seems more complicated than in Ubuntu. It's clear that the problem is not about Mock Node.

ianunay commented 8 years ago

Updated the readme about this downstream issue and closing this.