• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    해결됨

윈도우에서 진행하는데 오류가 납니다

21.08.20 20:48 작성 조회수 1.04k

1

안녕하세요 선생님

선생님은 맥에서 리눅스 환경으로  

npm install --arch=x64 --platform=linux sharp

로 진행하셨는데, 저는 윈도우에서 진행중입니다!

https://sharp.pixelplumbing.com/install 을 참고해

npm install sharp
또는
npm install --platform=win32 --arch=ia32 sharp
npm install --ignore-scripts=false --verbose sharp
 

위에 명령어로 설치해봐도 

2021-08-20T11:43:36.173Z undefined ERROR

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-linux-x64.node'

Require stack:

- /var/task/node_modules/sharp/lib/sharp.js

- /var/task/node_modules/sharp/lib/constructor.js

- /var/task/node_modules/sharp/lib/index.js

- /var/task/index.js

- /var/runtime/UserFunction.js

- /var/runtime/index.js

Possible solutions:

- Install with the --verbose flag and look for errors: "npm install --ignore-scripts=false --verbose sharp"

- Install for the current runtime: "npm install --platform=linux --arch=x64 sharp"

- Consult the installation documentation: https://sharp.pixelplumbing.com/install

이러한 에러가 납니다.

해결방안이 있을까요?

+추가로 npm install --platform=linux --arch=x64 sharp도 설치해봐도 같은 에러가 떠요!

 npm install --platform=win32 --arch=ia32 sharp
npm install --ignore-scripts=false --verbose sharp
npm install --platform=linux --arch=x64 sharp
이거 다설치해봐도 오류가 납니다
sharp-linux-x64.node이 명령어를 입력해도 설치가 안되는데
혹시 직접 노드파일을 넣어주면 오류가 안날까요?
../build/Release/ 경로에서 sharp-linux-x64.node 파일을 주실수있을까요?

답변 1

답변을 작성해보세요.

0

강전욱님 안녕하세요 :)

sharp uninstall 되어 있는 상태에서 npm install --arch=x64 --platform=linux sharp  이걸 실행하셨나요? 기존 sharp가 설치되어 있으면 안될거에요.

그리고 윈도우 환경이어도 platform을 linux로 해줘야 되요. 윈도우 로컬 환경에서 sharp를 사용하지 않고 linux환경인 람다에서 sharp를 사용할거라서요

강전욱님의 프로필

강전욱

질문자

2021.08.23

앗... 감사합니다 ㅎㅎ..

처음에 난 윈도우니까 윈도우 버전 설치해야지 하고 오류가나서 에러잡기위해 여러가지 실행해볼때 노드모듈파일만 삭제하고 npm uninstall sharp 를 안했었엇네요 ㅎㅎ..

npm install --platform=linux --arch=x64 sharp 만 설치하면 되네요!

저같은 분들을 위해 남겨놓겠습니다 ㅎㅎ..