반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- error
- vuejs
- bucket max-key
- v-text-field height
- Android
- sort
- naver storage
- onsenui
- bucket cors
- Electron
- 동일 프로그램
- MySQL
- f035d
- 프로세스 방지
- sequelize
- nodejs
- electron-nuxt
- CSS
- naver storage bucket error
- xlsx
- Vue
- NUXT
- onsen-ui
- v-select
- 동일 프로세스
- JavaScript
- Vuetify
- kotlin
- vuetifyjs
- c#
Archives
- Today
- Total
앙큼한 개발기록
[electron] serialport node-gyp error 오류 본문
electron을 사용하면서 serialport 를 연결하려고 하니 node-gyp 오류가 나오고
연결도 안되고
리빌드도 안되고 별짓을 다 해봤지만
결과적으로 electron-nuxt를 사용하면서 npm이 아닌 yarn을 사용하면서 발생한 패키지 설정 오류였다.
나에게 발생한 오류는 다음과 같았다.
Cannot find module 'C:\usr\local\lib\node_modules\node-gyp\bin\node-gyp.js'
해당 오류 발생시 C드라이브에 있는 node-module이 어디 있는지 찾아서
해당 모듈로 path를 재 설정 해주니 해결 되었다.
우선 powerShell이나 관리자 cmd를 열어서
npm config list
// or
yarn config list
로 config setting 값을 확인 하고
npm config delete node-gyp
// or
yarn config delete node-gyp
로 node-gyp 연결 값을 삭제하고
npm config set node_gyp <path>
// or
yarn config set node_gyp <path>
로 설정
참고
https://classic.yarnpkg.com/en/docs/cli/config
serialport 에서 index.js를 못찾거나 module를 못찾는 경우
serialport version을 잘 확인해 봐야 된다.
내 경우에는 9.x.x -> 10.x.x로 변경하고
코드 수정하고 해결 되었다.
버전 업그레이드는 "^9.x.x"로 되어 있는 경우 매인 버전은 업그레이드가 되지 않기 때문에
그냥 삭제하고 다시 설치 해야 된다.
버전 업데이트 대응에 관해서는 아래 url 참고
https://serialport.io/docs/guide-upgrade#upgrading-from-9x-to-10x
'개발 > electron' 카테고리의 다른 글
[electron] node-ffi error #1 Error: Dynamic Linking Error: Win32 error 126 (0) | 2022.07.26 |
---|---|
[electron] electron-nuxt serialport 연결 (0) | 2022.06.21 |
[electron] os별 build 방법 (0) | 2022.06.21 |
[electron-nuxt] windowHandler, browser 데이터 전송 (0) | 2022.06.20 |
Comments