Skip to content

Commit f21bb7c

Browse files
committed
Merge pull request #127 from TypeStrong/document-npm-link
Document usage of `npm link typescript`
2 parents 1ec91c8 + 51ad489 commit f21bb7c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ You will also need to install TypeScript if you have not already.
2121
npm install typescript
2222
```
2323

24+
or if you want to install TypeScript globally
25+
26+
```
27+
npm install typescript -g
28+
npm link typescript
29+
```
30+
2431
### Upgrading
2532

2633
Take advantage of the [Changelog](CHANGELOG.md) and [Upgrade Guide](UPGRADE.md).

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
162162
}
163163
catch (e) {
164164
let message = loaderOptions.compiler == 'typescript'
165-
? 'Could not load TypeScript. Try installing with `npm install typescript`'
165+
? 'Could not load TypeScript. Try installing with `npm install typescript`. If TypeScript is installed globally, try using `npm link typescript`.'
166166
: `Could not load TypeScript compiler with NPM package name \`${loaderOptions.compiler}\`. Are you sure it is correctly installed?`
167167
return { error: {
168168
message: message.red,

0 commit comments

Comments
 (0)