[email protected] requires a peer of typescript@>=2.1.0, [email protected] requires a peer of typescript@>=2.0.0

Created on 28 Apr 2017  ·  3Comments  ·  Source: palantir/tslint

Bug Report

Hello,

  • __TSLint version__: 5.1.0
  • __TypeScript version__: 2.3.1
  • __Running TSLint via__: CLI

I have installed on my Windows 7 computer typescript version 2.3.1 in my user folder
"C:UsersmateiaAppDataRoamingnpmnode_modulestypescript"

When I run npm install -g tslint I get the warnings below:

npm WARN [email protected] requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev but none was installed.
npm WARN [email protected] requires a peer of typescript@>=2.0.0 || >=2.0.0-dev || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev but none was installed.

TypeScript code being linted

// code snippet

with tslint.json configuration:


Actual behavior

Expected behavior

Could you please clarify how to eliminate the warning ?

Most helpful comment

Yes, I have first installed typescript by using npm install -g typescript
Then I tried to install tslint and got the warnings above.

But, thank you, I solved the problem, here is what I did.
npm uninstall -g typescript
npm install -g tslint typescript

All 3 comments

I have installed on my Windows 7 computer typescript version 2.3.1 in my user folder
"C:UsersmateiaAppDataRoamingnpmnode_modulestypescript"

I don't know what this means. Is that where npm put globally installed modules?

Did you run npm install -g typescript ?

Yes, I have first installed typescript by using npm install -g typescript
Then I tried to install tslint and got the warnings above.

But, thank you, I solved the problem, here is what I did.
npm uninstall -g typescript
npm install -g tslint typescript

Thank you ;)

Was this page helpful?
0 / 5 - 0 ratings