Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSB6006 : node.exe exited with code 1" in VS2019

When I build my new project in .Net Core VS2019 the build gets failed with an error. The project have some css and js files which uses typescript that cause this error. But I don't know what went wrong or what might be the cause of it.

I tried installing and unistalling the latest and old version of typescript and also installed the node.JS

The detailed output I get when I build is :

 Task "VsTsc"
1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js"  --project "D:\Piccolo.Admin\Piccolo.Admin\wwwroot\assets\vendors\general\summernote\tsconfig.json" --listEmittedFiles --locale en-US
1>    Unknown output:                 throw e;
1>    Unknown output:                 ^
1>    Unknown output:     at Object.createNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:16472:20)
1>    Unknown output:     at createSynthesizedNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:60303:23)
1>    Unknown output:     at Object.createTypeQueryNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:60891:20)
1>    Unknown output:     at symbolToTypeNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34983:31)
1>    Unknown output:     at createAnonymousTypeNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34315:36)
1>    Unknown output:     at typeToTypeNodeHelper (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34251:28)
1>    Unknown output:     at C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34042:106
1>    Unknown output:     at withContext (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34083:37)
1>    Unknown output:     at Object.typeToTypeNode (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34042:28)
1>    Unknown output:     at typeToString (C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\tsc.js:34021:40)
1>    C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.4\build\Microsoft.TypeScript.targets(462,5): error MSB6006: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe" exited with code 1.
1>  Done executing task "VsTsc" -- FAILED.
like image 727
Sri Avatar asked Apr 19 '26 16:04

Sri


1 Answers

I have the same error when I want to publish my project

C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.7\build\Microsoft.TypeScript.targets(463,5): error MSB6006: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe" exited with code 1.

I set "MSBuild project build output verbosity" to "Detailed" in "Tools->Options->Projects and Solutions->Build and Run" and I see VS want to compile several .ts files and can't do that.

this is my .ts files can't compile

4>Target "CompileTypeScript" skipped, due to false condition; ('$(BuildingProject)' != 'false' AND '@(ConfigFiles)' == '' AND '@(TypeScriptCompile)' != '' AND '$(DesignTimeBuild)' != 'true') was evaluated as ('true' != 'false' AND 'App_Themes\Dashboard\Vendors\summernote\tsconfig.json' == '' AND 'App_Themes\Dashboard\Vendors\handlebars\lib\handlebars.d.ts;App_Themes\Dashboard\Vendors\moment\moment.d.ts;App_Themes\Dashboard\Vendors\perfect-scrollbar\types\perfect-scrollbar.d.ts;App_Themes\Dashboard\Vendors\popper.js\index.d.ts;App_Themes\Dashboard\Vendors\sweetalert2\sweetalert2.d.ts;App_Themes\Dashboard\Vendors\tooltip.js\index.d.ts;Scripts\index.d.ts' != '' AND '' != 'true').

I exclude these files and successfully published my project

you can exclude .ts file(s) from your project or modify and try again

like image 125
MeisamDev Avatar answered Apr 22 '26 07:04

MeisamDev