Typings 'Cannot find module' – but only on some machines. Same project. Any ideas?

I’ve got the same project cloned on two machines. Both are running VS2015 and have Typings 1.8.6 installed. The working machine is Enterprise, the other is Professional… but I don’t expect that matters.

Interestingly I get full intellisense support even without any triple slash references in individual files on the first machine. I think it picks up the triple slash file from a single file in scripts I called refs.d.ts (I suppose similar to a _references.js).

On the second machine all external imports throw ‘Cannot find module …’. This does not apply to internal imports from other project files.

So this line fails:

import {Component} from 'angular2/core'

But this line works:

import {AppComponent} from './app.component';

It’s like the working machine has some sort of global / enviornment settings the second is missing… but I’ve been trying to get the other machine working for days! Help much appreciated.

What I’ve tried on the second machine:

Triple slash in individual .ts files

///<reference path="../../node_modules/angular2/typings/browser.d.ts" />

Adjusting tsconfig.js:

  • Removing node_modules from the exclude list
  • Explicitly referencing the angular2 type definition file in the files array.
  • ModuleResolution is ‘Node’

Reinstalling typings on VS.

Leave a Reply

1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
newest oldest most voted
Notify of


I upgraded from VS2015 to VS2015 Update 2.

The machine that was already working was running Update 1.

This has been driving me nuts for days. Hope it saves someone else the headache!