davglass / zipcodes

Zipcode lookup node module
Other
157 stars 83 forks source link

Make command not working #23

Open northoutIshan opened 6 years ago

northoutIshan commented 6 years ago

Getting this error

istanbul cover --print both -- vows --spec ./tests/lookup.js

'istanbul' is not recognized as an internal or external command,

davglass commented 6 years ago

Did you do an npm install first?

northoutIshan commented 6 years ago

Yes absolutely. This error comes when I ran make command

davglass commented 6 years ago

Weird, istanbul is installed via npm and is executed by calling npm test. Not sure why that would fail if it's installed properly. I just tested it an it worked as expected.

Now did you clone the repo and run make or did you install the zipcodes npm package and run make? The former works, but the later will not as istanbul is not installed during that process.

northoutIshan commented 6 years ago

Let me describe you the process that I have done.

Then I get the above error.

davglass commented 6 years ago

Yup, that's what I thought.. Using make is only fully supported from the git repo not from the installed module. You can run make zips && make cazips from the installed module if you want the codes updated. The only thing that won't run is the tests since istanbul doesn't get installed.

northoutIshan commented 6 years ago

Hi I tried to use the make command by taking clone of the repo, But it gives me the same. make i info Invoking cazips target '.' is not recognized as an internal or external command, operable program or batch file. make × ERR ./scripts/fetch_canada.sh make × ERR Recipe exited with code %d (node:20220) UnhandledPromiseRejectionWarning: Error: Recipe exited with code %d at ChildProcess.<anonymous> (C:\Users\north\AppData\Roaming\nvm\v10.3.0\node_modules\make\src\cli.js:143:28) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:961:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) (node:20220) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:20220) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

davglass commented 6 years ago

I haven't tested this on windows nor Node 10, but it works on Linux and Mac perfectly fine. You shouldn't need to do a make unless you need updated data, the module contains all of the code data from the last build.

davglass commented 6 years ago

I just published zipcodes@6.0.1 with the latest code data so you don't need to build it.

northoutIshan commented 6 years ago

Thank you so much. I'll try with the new version.