Cannot find module 'lodash.curry' via Node.js
<p>I am working on <strong>Currying</strong> topic from <a href="https://drboolean.gitbooks.io/mostly-adequate-guide/content/ch4.html" rel="nofollow">Mostly Adequate Guide by Professor Frisby</a>, I try to install lodash via <code>npm</code> after realize browser can't run <code>require()</code>.  I've been through searching here to use similar solutions but doesn't work, I want to make it run on Node on local server or using <code>script</code>, still same results below and also <code>ramda</code>.</p>

<pre><code>Error: Cannot find module 'lodash.curry'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.&lt;anonymous&gt; (/Users/hueke32/Desktop/lodash_test/lodashTest.js:1:13)
    at Module._compile (module.js:399:26)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
    at Function.Module.runMain (module.js:431:10)
</code></pre>

<p>Package.json</p>

<pre><code>{
  "name": "lodash_test",
  "version": "1.0.0",
  "description": "",
  "main": "lodashTest.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "browser-sync": "^2.11.0",
    "lodash": "^3.10.1"
  }
}
</code></pre>

<p>lodashTest.js</p>

<pre><code>var curry = require('lodash.curry');

var match = curry(function(what, str) {
  return str.match(what);
});

var replace = curry(function(what, replacement, str) {
  return str.replace(what, replacement);
});

var filter = curry(function(f, ary) {
  return ary.filter(f);
});

var map = curry(function(f, ary) {
  return ary.map(f);
});

match(/\s+/g, "hello world");

match(/\s+/g)("hello world");

var hasSpaces = match(/\s+/g);

hasSpaces("hello world");

hasSpaces("spaceless");

filter(hasSpaces, ["tori_spelling", "tori amos"]);

var findSpaces = filter(hasSpaces);

findSpaces(["tori_spelling", "tori amos"]);

var noVowels = replace(/[aeiou]/ig);

var censored = noVowels("*");

censored("Chocolate Rain");
</code></pre>

<p>index.html</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;Document&lt;/title&gt;
  &lt;script src="lodashTest.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>