inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

이미지 관리 풀스택(feat. Node.js, React, MongoDB, AWS)

Sharp 모듈로 이미지 크기 수정하기

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

해결된 질문

1648

강전욱

작성한 질문수 3

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 파일을 주실수있을까요?

lambda nodejs mongodb express aws react

답변 1

0

김시훈 (도도소프트)

강전욱님 안녕하세요 :)

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

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

0

강전욱

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

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

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

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

Router.use 두번째 파라미터 ImageRouter : undefined 전달 오류

0

127

2

소스코드 요청

0

164

1

프록시 관련 질문

0

169

1

Presigned URL 사용시 데이터베이스 저장 시점

0

335

1

이미지 등록시 자동 등록 오류

0

218

1

강의에 사용된 코드 다운 받는 사이트 주소 있나요?

0

390

2

axios 이용해서 백엔드로 이미지 전송 중 새로고침

0

476

1

ImageList 컴포넌트에서 업로드 한 사진을 리스트에서 바로 보기 위해 이 방법도 괜찮나요??

0

386

1

이미지 처음 올릴 때만 나타나는 오류

0

257

1

es6 스타일로 Import 할때 동작하지 않습니다.

0

393

1

이미지 업로드시

0

367

1

node js를 이용하고 mysql에 이미지 경로 저장

2

1263

1

선생님 cloudFront를 사용하게되면 S3는 private으로 사용하는게 좋을까요

0

545

1

선생님 aws-sdk 모듈을 찾을 수 없다고 합니다.

0

667

1

new aws.S3 version 확인

2

509

1

react-router-dom v6 useHistory 이슈

7

641

0

람다에서 시간 초과 에러가 뜹니다!

0

318

1

첫 로드시 동일한 이미지 두번호출

2

493

1

이미지 업로드 시 배열로

2

532

1

Promise.all에 대한 질문

0

431

1

세션에 관한 질문이 있습니다.

0

434

1

Promise.all관련 질문 ("여러 이미지 미리보기" 중...)

0

312

1

cdn 주소

0

510

1

특정 user 페이지 가져오기 질문있습니다.

0

298

1