Typescript TS5042 Build: Option 'project' cannot be mixed with source files on a command line

前端 未结 7 953
北恋
北恋 2021-02-18 22:23

I am receiving the following error across all typescript projects that I am trying run.

TS5042  Build: Option \'project\' cannot be mixed with source files on a          


        
7条回答
  •  说谎
    说谎 (楼主)
    2021-02-18 23:17

    The solution for me was pretty simple. I looked at the filepath for my project and realized one of the folder names in the file path had a space in it. When I renamed the folder without the space, TSC -p worked just fine. It seems like TSC, when parsing out command line args, splits it at spaces so it saw the part of my filepath name after the space as a file to compile.

提交回复
热议问题