radjivF / node-geolocation

Npm module for Geolocation stuff based on google maps API technology
https://www.npmjs.com/package/node-geolocation
MIT License
8 stars 2 forks source link

Getting error Cannot find module 'node-geolocation' #12

Open kmtabish opened 9 years ago

kmtabish commented 9 years ago

I am getting error after installing the npm.

Error: Cannot find module 'node-geolocation' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25)

coderigo commented 8 years ago

Same. What version of node are you using? I'm on v4.1.1. Thought installing it globally would help but no joy.

-- Edit (a few mins later) ---

So it turns out that doing an npm install node-geolocation installs node-geolocation in node_modules but that directory doesn't contain node-geolocation's lib directory nor the important geolocation.js file.

Perhaps npm/node version issue? I'm on node v4.1.1 and npm v3.5.2.

For the moment I have manually created file in node_modules/node-geolocation/lib/geolocation.js and pasted its contents in from this GH page, but not optimal.

travisbaratcart commented 8 years ago

I'm having the same issue.

therebelrobot commented 8 years ago

This is the part of package.json that is killing this module:

"files": [
    "LICENSE",
    "README.md"
  ],

It's only including those two files whenever npm pulls it, whether it's from the registry or github. Patching and will get a pr in today.

therebelrobot commented 8 years ago

Until that PR is merged and deployed to npm, you can use this update by changing your package.json to read:

  "dependencies": {
    ...
    "node-geolocation": "git://github.com/therebelrobot/node-geolocation.git",
    ...
  },
therebelrobot commented 8 years ago

Scratch that. This project isn't even using node-geocoder correctly. I'm gonna move to just using that.