TypeScript: Cannot find module 'selenium-webdriver/chrome'
<p>I'm writing a testing library using TypeScript and Selenium Webdriver. Although I'm getting no compilation errors, when I try to run the project I'm getting an error that the module can't be found.</p>

<p>Prereqs: I have the typing installed and included in <code>tsd.json</code> and the reference path in <code>tsd.d.ts</code>. I do not get any warnings or errors when including or building the file. This only happens at runtime.</p>

<pre><code>/* TypeScript File */

import { Options, ServiceBuilder, Driver as ChromeDriver } from 'selenium-webdriver/chrome';

const options               = new Options(),
      service               = new ServiceBuilder('./chromedriver/chromedriver').build(),
      Driver: ChromeDriver  = new ChromeDriver(options, service);

/** @type Chrome.Driver */
export default Driver;
</code></pre>

<p>That file is being compiled down to this JS file </p>

<pre><code>"use strict";
var chrome_1 = require('selenium-webdriver/chrome');
var options = new chrome_1.Options(), service = new chrome_1.ServiceBuilder('./chromedriver/chromedriver').build(), Driver = new chrome_1.Driver(options, service);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Driver;
//# sourceMappingURL=driver.js.map
</code></pre>

<p>But, produces this error when trying to run</p>

<pre><code>Running "mochaTest:test" (mochaTest) task
&gt;&gt; Mocha exploded!
&gt;&gt; Error: Cannot find module 'selenium-webdriver/chrome'
&gt;&gt;   at Function.Module._resolveFilename (module.js:339:15)
&gt;&gt;   at Function.Module._load (module.js:290:25)
&gt;&gt;   at Module.require (module.js:367:17)
&gt;&gt;   at require (internal/module.js:16:19)
&gt;&gt;   at Object.&lt;anonymous&gt; (/Users/wluce/Documents/QA/config/driver.js:2:16)
&gt;&gt;   at Module._compile (module.js:413:34)
&gt;&gt;   at Object.Module._extensions..js (module.js:422:10)
&gt;&gt;   at Module.load (/Users/wluce/Documents/QA/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
&gt;&gt;   at Function.Module._load (module.js:314:12)
&gt;&gt;   at Module.require (module.js:367:17)
&gt;&gt;   at require (internal/module.js:16:19)
&gt;&gt;   at Object.&lt;anonymous&gt; (/Users/wluce/Documents/QA/model/test/test.js:4:16)
&gt;&gt;   at Module._compile (module.js:413:34)
&gt;&gt;   at Object.Module._extensions..js (module.js:422:10)
&gt;&gt;   at Module.load (/Users/wluce/Documents/QA/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
&gt;&gt;   at Function.Module._load (module.js:314:12)
&gt;&gt;   at Module.require (module.js:367:17)
&gt;&gt;   at require (internal/module.js:16:19)
&gt;&gt;   at /Users/wluce/Documents/QA/node_modules/mocha/lib/mocha.js:222:27
&gt;&gt;   at Array.forEach (native)
&gt;&gt;   at Mocha.loadFiles (/Users/wluce/Documents/QA/node_modules/mocha/lib/mocha.js:219:14)
&gt;&gt;   at Mocha.run (/Users/wluce/Documents/QA/node_modules/mocha/lib/mocha.js:487:10)
&gt;&gt;   at MochaWrapper.run (/Users/wluce/Documents/QA/node_modules/grunt-mocha-test/tasks/lib/MochaWrapper.js:44:13)
&gt;&gt;   at /Users/wluce/Documents/QA/node_modules/grunt-mocha-test/tasks/mocha-test.js:84:20
&gt;&gt;   at capture (/Users/wluce/Documents/QA/node_modules/grunt-mocha-test/tasks/mocha-test.js:31:5)
&gt;&gt;   at Object.&lt;anonymous&gt; (/Users/wluce/Documents/QA/node_modules/grunt-mocha-test/tasks/mocha-test.js:79:5)
&gt;&gt;   at Object.&lt;anonymous&gt; (/Users/wluce/Documents/QA/node_modules/grunt/lib/grunt/task.js:255:15)
&gt;&gt;   at Object.thisTask.fn (/Users/wluce/Documents/QA/node_modules/grunt/lib/grunt/task.js:73:16)
&gt;&gt;   at Object.&lt;anonymous&gt; (/Users/wluce/Documents/QA/node_modules/grunt/lib/util/task.js:294:30)
&gt;&gt;   at Task.runTaskFn (/Users/wluce/Documents/QA/node_modules/grunt/lib/util/task.js:244:24)
&gt;&gt;   at Task.&lt;anonymous&gt; (/Users/wluce/Documents/QA/node_modules/grunt/lib/util/task.js:293:12)
&gt;&gt;   at /Users/wluce/Documents/QA/node_modules/grunt/lib/util/task.js:220:11
&gt;&gt;   at _combinedTickCallback (node.js:376:9)
&gt;&gt;   at process._tickDomainCallback (node.js:431:11)
&gt;&gt;   at Function.Module.runMain (module.js:449:11)
&gt;&gt;   at startup (node.js:142:18)
&gt;&gt;   at node.js:939:3
</code></pre>