Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inlineSources in tsconfig causes TypeScript: emit failed #396

Closed
fuocor opened this issue Aug 26, 2016 · 2 comments
Closed

inlineSources in tsconfig causes TypeScript: emit failed #396

fuocor opened this issue Aug 26, 2016 · 2 comments
Labels

Comments

@fuocor
Copy link

fuocor commented Aug 26, 2016

I'm using the following:
"typescript": "^1.8.10"
"gulp-typescript": "^2.13.6",

-- gulp task
var tsProject = ts.createProject('src/tsconfig.json', { typescript: typescript });
gulp.task('ts', function (done) {
//var tsResult = tsProject.src()
var tsResult = gulp.src([
"src/*.ts"
])
.pipe(ts(tsProject), undefined, ts.reporter.fullReporter());
return tsResult.js.pipe(gulp.dest('./wwwroot/dist'));
});

--tsconfig

{
"compileOnSave": false,
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noEmit": false,
"noImplicitAny": true,
"outDir": "../wwwroot/",
"inlineSourceMap": true,
"target": "es5",
"inlineSources": true,
"allowJs": false
},
"angularCompilerOptions": {
"genDir": "./generated",
"debug": true
},
"exclude": [
"node_modules",
"typings/index",
"typings/index.d.ts"
]
}

From the commandline tsc works fine

@ivogabe
Copy link
Owner

ivogabe commented Aug 30, 2016

You should use gulp-sourcemaps for source maps generation. You should pass all source map related options to gulp-sourcemaps instead, see their documentation. Marking this a bug, since you shouldn't see 'emit failed'.

@ivogabe ivogabe added the Bug label Aug 30, 2016
@akrivitzky
Copy link

+1 on the bug. I spent hours trying to figure out why my project wouldn't work with gulp. Thanks for the issue post. I would have never found it otherwise. Definitely, should say something more than "Typescript: emit failed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants