generator-fountain-webapp icon indicating copy to clipboard operation
generator-fountain-webapp copied to clipboard

"typeRoots" and "types" options are not recognized.

Open fedochet opened this issue 9 years ago • 3 comments

Description

Typescript version is not 2 or higher -- some tsconfig options are not recognized. package.json seem to have right versions of both typescript and gulp-typescript. I did not change any of generated code.

Error Message & Stack Trace

[17:55:06] Using gulpfile ~/Documents/frontend/fountain_app/gulpfile.js
[17:55:06] Starting 'default'...
[17:55:06] Starting 'clean'...
[17:55:06] Finished 'clean' after 4.93 ms
[17:55:06] Starting 'build'...
[17:55:06] Starting 'partials'...
[17:55:06] Finished 'partials' after 58 ms
[17:55:06] Starting 'inject'...
[17:55:06] Starting 'other'...
[17:55:07] Starting 'styles'...
[17:55:07] Starting 'scripts'...
error TS5023: Unknown compiler option 'typeRoots'.
error TS5023: Unknown compiler option 'types'.
[17:55:07] Finished 'other' after 79 ms
[17:55:07] Finished 'styles' after 278 ms

There are many type errors after that -- I can add them if needed.

Config

{
  "generator-fountain-angular1": {
    "version": "1.0.0-rc2",
    "props": {
      "framework": "angular1",
      "modules": "inject",
      "js": "typescript",
      "ci": [],
      "css": "css",
      "resolved": "/usr/local/lib/node_modules/generator-fountain-webapp/node_modules/generator-fountain-angular1/generators/app/index.js",
      "namespace": "fountain-angular1",
      "argv": {
        "remain": [],
        "cooked": [],
        "original": []
      },
      "sample": "todoMVC",
      "router": "none"
    }
  }
}

Environment

Node.js v7.2.1
linux 4.4.0-53-generic
yo: 1.8.5
npm: 3.10.10

Thanks in advance!

fedochet avatar Dec 26 '16 15:12 fedochet

I think I have found the reason: there are incompatibilities of typescript versions in gulp-typescript and typescript itself:

{
  "devDependencies": {
    ...
    "gulp-typescript": "^2.10.0",
    ...
    "typescript": "^2.1.0",
    ...
  },
...
}

gulp-typescript takes [email protected] or something - that is why errors occure. If you change version of gulp-typescript to 3.1.0 or higher, those error (and all typings error) will disappear.

fedochet avatar Dec 28 '16 17:12 fedochet

same issue. your pills help me thanks!

madbonez avatar Jan 19 '17 17:01 madbonez

same issue, but could not identify the module containing the old typescript version.

nise avatar Aug 03 '17 20:08 nise