김펭귄 관찰일기
article thumbnail

 Code Runner Extension을 설치하고 C# 스크립트 빌드를 테스트했는데 또잉.. 처음 보는 에러를 만났다.

 

1. 1. /bin/sh: scriptcs: command not found 해결 방법

/bin/sh: scriptcs: command not found

 사실 해결법은 엄청 간단하다. scriptcs라는 명령어를 찾을 수 없다고 하니, scriptcs를 설치해주면 된다.

 

<bash />
brew install scriptcs

brew install scriptcs

 설치 후에 다시 한 번 빌드 시켜주면 짠!


2. 2. Unexpected named argument: Users/penguinkim/DobbyIsFree/Sparta/C#/HelloWorld.cs

Unexpected&nbsp;named&nbsp;argument:

 역시 쉽게 쉽게 넘어가면 재미없지 :) 하..

 찾아보니 scriptcs 버그 일종이라고 한다. Code-Runner의 settings.json을 조금 수정해주면 된다. 먼저 VSCode Setting 창을 띄워보자.

 


VSCode Setting 창 띄우기

Mac : Command + ,
Window : Ctrl + ,

 위의 설정 검색창에서 Code Runner을 치면 Code Runner Setting 페이지가 나온다. 여기서 직접 체크해서 세팅하는 방법도 있고, 우측 상단에 마커된 버튼을 눌러서

 

 settings.json을 열 수도 있다. 아마 어떠한 세팅도 해두지 않은 상태라면 텅 비어있을텐데

<bash />
"code-runner.runInTerminal": true, "code-runner.executorMap": { "javascript": "node", "java": "cd $dir && javac $fileName && java $fileNameWithoutExt", "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "zig": "zig run", "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "php": "php", "python": "python -u", "perl": "perl", "perl6": "perl6", "ruby": "ruby", "go": "go run", "lua": "lua", "groovy": "groovy", "powershell": "powershell -ExecutionPolicy ByPass -File", "bat": "cmd /c", "shellscript": "bash", "fsharp": "fsi", "csharp": "cd $dir && dotnet run $fileName", "vbscript": "cscript //Nologo", "typescript": "ts-node", "coffeescript": "coffee", "scala": "scala", "swift": "swift", "julia": "julia", "crystal": "crystal", "ocaml": "ocaml", "r": "Rscript", "applescript": "osascript", "clojure": "lein exec", "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt", "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt", "racket": "racket", "scheme": "csi -script", "ahk": "autohotkey", "autoit": "autoit3", "dart": "dart", "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt", "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt", "haskell": "runghc", "nim": "nim compile --verbosity:0 --hints:off --run", "lisp": "sbcl --script", "kit": "kitc --run", "v": "v run", "sass": "sass --style expanded", "scss": "scss --style expanded", "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css", "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "sml": "cd $dir && sml $fileName" }

 위 내용을 복사해서 넣어주자 :) Command + S 로 저장하고 나와준 다음 실행시켜보면

 

 잘 나오는 것을 볼 수 있다!

profile

김펭귄 관찰일기

@Penguin.Kim