Avatar ·

Error de TypeScript: "Cannot write file ... because it would overwrite input file" en Visual Studio

¡Hola a todos! Soy nuevo en TypeScript, escribo en él en Visual Studio 2015. Instalé TypeScript 2.0 a través de NuGet. Creé un proyecto simple donde hay un archivo app.ts:

\n\n
function greet(name: string) {\n    return `Hello, ${name}!`;\n}\n\nconsole.log(greet('World'));
\n\n

En tsconfig.json tengo configurado:

\n\n
{\n    "compilerOptions": {\n        "target": "es5",\n        "outDir": "./dist",\n        "rootDir": "./src"\n    },\n    "include": [\n        "src/**/*"\n    ]\n}
\n\n

El archivo app.ts está en la carpeta src. Al intentar compilar el proyecto (Ctrl+Shift+B) recibo el error:

\n\n
Cannot write file 'C:/Projects/MyApp/dist/app.js' because it would overwrite input file.