Closed VladimyrRomanishyn closed 7 years ago
@VladimyrRomanishyn could you try with version 1.3
Node_modules errors disappeared, but " Failed to compile ..." still the same. Via native tsc compiler from terminal all works, but I must do it every time manually.
@VladimyrRomanishyn this one looks like you miss "es5" in the "lib"
here my gulpfile.js, changed "es2015" to "es5", but still the same(
const gulp = require('gulp');
const nodemon = require('gulp-nodemon');
const ts = require('gulp-tsc');
//-------------------------------------
gulp.task('start', ()=> {
nodemon({
script: 'index.js'
, ext: 'js html'
, env: { 'NODE_ENV': 'development' }
})
});
//-------------------------------------
//gulp.watch('client/src/**/*.ts',['script']);
//-------------------------------------
gulp.task('script', ()=>{
gulp.src('client/src/**/*.ts')
.pipe(ts({
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es5", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"emitError": false
}));
});
//-------------------------------------
gulp.task('default',['start','script']);
You should have both "es5" and "es2015", something like that.
gulp.task('script', ()=>{
gulp.src('client/src/**/*.ts')
.pipe(ts({
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es5", "es2015", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"emitError": false
}));
});
Hello, how fix this?
gulpfile.js