"typeRoots" and "types" options are not recognized.
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!
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.
same issue. your pills help me thanks!
same issue, but could not identify the module containing the old typescript version.