본문 바로가기

Front-end

'rm' is not recognized as an internal or external command,operable program or batch file.

Problem 

Window Command Prompt(cmd)에서 lerna run 시 아래와 같은 에러가 발생했다. 

Window Powershell 환경에서도 같은 에러가 발생한다. 

 

lerna notice cli v3.22.1
lerna info Executing command in 12 packages: "yarn run build"
lerna ERR! yarn run build exited 1 in '패키지'
lerna ERR! yarn run build stdout:
$ yarn run clean && yarn webpack --config webpack.config.js --env development
$ rm -rf dist
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr:
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
error Command failed with exit code 1.

lerna ERR! yarn run build exited 1 in '패키지'
lerna WARN complete Waiting for 8 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

'rm' is not recognized as an internal or external command,operable program or batch file.

Solution

윈도우에서는 삭제 명령어를 수행하고 싶을 때 rm 리눅스 명령어 대신 del 을 사용해야 한다.

Git bash는 윈도우 환경에서도 Linux & Unix 계열의 명령어를 사용할 수 있다.

 

Git bash 를 사용하자 ... 

반응형