Reputation: 462
Cmd error: "sh" is not recognized as an internal or external command, operable program or batch file.
C:\Users\user>npm install -g node-curl
npm http GET https://registry.npmjs.org/node-curl
npm http 304 https://registry.npmjs.org/node-curl
> [email protected] install C:\Users\user\AppData\Roaming\npm\node_modules\node-cu
rl
> sh src/generate_curl_options_list.sh && node-waf configure build || true
"sh" is not recognized as an internal or external command, operable program or batch file.
"true" is not recognized as an internal or external command, operable program or batch file.
Upvotes: 4
Views: 3839
Reputation: 9529
To expand on Florian's answer: You're on Windows, which doesn't have cURL
or sh
. You're trying to install a module that relies on your operating system offering the libcurl-library and sh
, which is not shipped with Windows.
You have some options:
Write your own node-only implementation that behaves like curl.
See this question on SO: Curl equivalent in nodejs?
It goes into details of how to use the built-in http
module, like curl.
Or install libcurl
and sh
on windows, with a tool like cygwin. I haven't tried this, and the npm module you're trying to install might still have dependencies on other unix tools that aren't solved by cygwin.
Or look for something else in http://search.npmjs.org/ that behaves like curl. Try httpsync
or curly
I recommend option 1, it'll teach you basic http principles. The native modules in node already offer everything you might need curl for. :)
Upvotes: 5
Reputation: 60717
Well, using node-curl on windows, that doesn't have curl, is quite stupid.
Don't try.
Upvotes: -4