Visual Studio में TypeScript त्रुटि: "Cannot write file ... because it would overwrite input file"
सभी को नमस्कार! मैं TypeScript में नया हूँ, Visual Studio 2015 में लिख रहा हूँ। NuGet के माध्यम से TypeScript 2.0 इंस्टॉल किया। एक सरल प्रोजेक्ट बनाया जिसमें एक फ़ाइल app.ts है:
function greet(name: string) {
return `Hello, ${name}!`;
}
console.log(greet('World'));
tsconfig.json में मैंने यह लिखा है:
{
"compilerOptions": {
"target": "es5",
"outDir": "./dist",
"rootDir": "./src"
},
"include": [
"src/**/*"
]
}
app.ts फ़ाइल src फ़ोल्डर में है। प्रोजेक्ट बनाने का प्रयास करने पर (Ctrl+Shift+B) मुझे यह त्रुटि मिलती है:
Cannot write file 'C:/Projects/MyApp/dist/app.js' because it would overwrite input file.