Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rimraf: not found / nest: not found 에러 이슈 #19

Open
develjsw opened this issue Sep 10, 2024 · 0 comments
Open

rimraf: not found / nest: not found 에러 이슈 #19

develjsw opened this issue Sep 10, 2024 · 0 comments

Comments

@develjsw
Copy link
Owner

  1. 이슈 : Jenkins를 통해 Dockerfile에 정의 해둔 NestJS 이미지를 빌드하고자 했으나 에러가 발생함

      EX-1)
      > [email protected] prebuild
      > rimraf dist
      
      [91msh: 1: rimraf: not found
      [0mThe command '/bin/sh -c npm run build' returned a non-zero code: 127
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE
    
      EX-2)    
      > [email protected] build
      > nest build
      
      [91msh: 1: nest: not found
      [0mThe command '/bin/sh -c npm run build' returned a non-zero code: 127
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE
    
  2. 원인 : Dockerfile에 npm ci 명령어를 통해 의존성 설치를 진행하는 부분에서 ( package.json의 dependencies )
    해당 패키지가 미존재 하여 발생한 이슈

  3. 해결 방안 : 아래 명령어를 통해 의존성 설치 진행 후 Jenkins 재빌드 진행

    $ npm i rimraf
    
    $ npm i @nestjs/cli
    

참고 사항 :

  • NODE_ENV=production 일때 npm ci 명령어를 사용하면 dependencies만 설치함
  • NODE_ENV=development 또는 NODE_ENV 설정이 없으면 dependencies와 devDependencies 모두 설치됨
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant