grunt-ts
grunt-ts copied to clipboard
Unmet dependency typescript 2.3.3 || ~1
While installing I am getting below error:
C:\Users\pratik\Documents\GitHub\CS810W2>npm install --save-dev grunt-ts
[email protected] C:\Users\pratik\Documents\GitHub\CS810W2\
+-- [email protected]
`-- UNMET PEER DEPENDENCY typescript@^2.3.3 || ~1
The typescript installed is 2.4.2.
C:\Users\pratik\Documents\GitHub\CS810W2>tsc -v
Version 2.4.2
The typescript is installed globally. Still getting the above issue. But when typescript is installed locally, this issue doesn't occur.
what version of npm do you have?
@nycdotnet 4.1.2
Thanks for the reply, @GaikwadPratik . I think this is a "problem" with npm - not really a bug but just something weird about how it works with peer dependencies vs things installed globally.
Is your concern that you are getting a warning you don't expect, or is grunt-ts not working with your global TypeScript?
If the latter, what is the problem with installing TypeScript in the project? That's typically the way I see things work best because it allows each project to have a stable TypeScript compiler version.
@nycdotnet I am getting issue with grunt-ts not working when TypeScript is installed globally. I understand that each project needs a stable TypeScript compiler but isn't that the whole point of installing TS globally. I was merely wondering why TS has to be duplicated when available globally?
Well to be honest I thought it would work with the globally installed TS if TypeScript wasn't there. I can't change the npm warning, but I agree this is a grunt-ts bug. I will investigate.
For now, install TypeScript locally.