AngularJs + Typescript: error TS2307: Cannot find module 'angular'
<p>I'm trying to combine Angular1.5 + Typescript.
Installed needed types:</p>

<p><code>npm install @types/angularjs</code></p>

<p>but still see the error:</p>

<blockquote>
  <p>error TS2307: Cannot find module 'angular'</p>
</blockquote>

<p>Already tried different options: </p>

<pre><code>import 'angular';
import 'angularjs'; //that is name inside @types
import angular from 'angularjs';
import * as angular from 'angular';
</code></pre>

<p>I'm using:</p>

<pre><code>"ts-loader": "1.0.0",
"typescript": "2.0.7",
"webpack": "1.13.3",
"webpack-dev-server": "1.16.2"
</code></pre>

<p><strong>tsconfig</strong> is pretty standard:</p>

<pre><code>{
  "compilerOptions": {
    "target": "es5",
    "noImplicitAny": false,
    "sourceMap": false,
    "lib": ["es6", "dom"],
    "typeRoots": ["./node_modules/@types"]
  },
  "exclude": ["node_modules"]
}
</code></pre>

<p>already simplified <strong>webpack</strong> config as much as possible:
    var webpack = new require('webpack');</p>

<pre><code>module.exports = {
  context: __dirname + '/src',
  entry: './index.ts',
  output: {
    path: './dist',
    filename: 'app.bundle.js'
  },
  module: {loaders: [{test: /\.tsx?$/, loader: 'ts-loader'},]},
  resolve: {
    extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js'],
  },

  plugins: [new webpack.NoErrorsPlugin()],

  devtool: 'source-map',

  devServer: {
    contentBase: './dist',
    historyApiFallback: true,
    inline: true
  }
};
</code></pre>

<p>And I also simplified <strong>index.ts</strong> itself, to focus only on type import:</p>

<pre><code>import * as angular from 'angular';
angular.module('testmodule', []);
</code></pre>

<p><strong>UPD</strong>: tsconfig.json. Added typeRoots option.</p>

<p>Now getting new errors: </p>

<blockquote>
  <p>ERROR in .../node_modules/@types/angularjs/angular-mocks.d.ts
  (6,26): error TS2307: Cannot find module 'angular'.</p>
  
  <p>ERROR in .../node_modules/@types/angularjs/angular-mocks.d.ts
  (65,49): error TS2304: Cannot find name 'IServiceProvider'.</p>
  
  <p>ERROR in .../node_modules/@types/angularjs/angular-mocks.d.ts
  (122,62): error TS2304: Cannot find name 'IScope'.</p>
  
  <p>ERROR in .../node_modules/@types/angularjs/index.d.ts
  (66,43): error TS2304: Cannot find name 'JQuery'.</p>
</blockquote>