typescriptgulpgulp-typescript

I can't install gulp-typescript in my project


I installed typescript & gulp-typescript globally and locally, even my devDependencies in package.json have "gulp-typescript": "^3.1.6" but when I write gulp tsc in cmd, it says: typescript is not installed - install with 'npm install typescript --save-dev'

screenshot after run gulp:
screenshot after run gulp

screenshot after npm install typescript --save-dev:
screenshot after <code>npm install typescript --save-dev</code>


Solution

  • The issue is that your package name typescript is same as the package you are trying to install. Change your package name in package.json to something other than typescript:

    {
      "name": "typescript-something"
      // ...
    }