Skip to content

expo 시뮬레이터 구동 후, styled-components 설치 에러 관련하여 질문드립니다 #2

@rudenick0309

Description

@rudenick0309

영상대로 따라하면서, 웹 상에서 android 시뮬레이터를 구동했습니다. 처음에는 open~~이라고 되어있는 첫 화면을 Hello, world라고 바꾸는 것까지는 문제가 없었습니다.
하지만, npm i styled-components를 하면서 아래와 같은 에러메세지가 뜹니다.

위 명령어를 입력한 터미널에는 아래처럼 메세지가 떴고,

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\ruden\coding\react-native-new\firstProject\node_modules\babel-plugin-syntax-jsx
npm ERR! dest C:\Users\ruden\coding\react-native-new\firstProject\node_modules\.babel-plugin-syntax-jsx.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\ruden\coding\react-native-new\firstProject\node_modul
es\babel-plugin-syntax-jsx' -> 'C:\Users\ruden\coding\react-native-new\firstProject\node_modules\.babel-plugin-syntax-jsx
.DELETE'

expo start 명령어를 입력한 터미널에는 아래와 같은 메세지가 출력이 되었습니다.

Error: Connection reset
* [native code]:null in __expoConsoleLog
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:75625:2
0 in warn
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:73416:2
3 in registerWarning
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:73333:3
3 in warnImpl
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:73278:2
0 in warn
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:113245:
22 in warn
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:36882:1
8 in setHMRUnavailableReason
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:36817:3
1 in <unknown>
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:37355:3
4 in emit
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:37074:1
8 in onerror
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:34585:3
0 in dispatchEvent
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:35290:3
0 in <unknown>
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:3898:41
in emit
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:3254:48
in __callFunction
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:2976:30
in <unknown>
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:3208:14
in __guard
* http://192.168.0.6:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:2975:20
in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue

에러에 나온대로 루트를 가서 파일명을 재설정하라는 거 같은데...일단은 위와 같은 파일이 안 보입니다.
정확한 루트대로의 폴더는 없었지만, babel-plugin-syntax-jsx 라는 폴더를 찾긴 찾았습니다. 해당 폴더 안에는 lib, LICENSE, package.json, README.md가 있었습니다.
이거는 파일이 아니었고, 또, 에러 메세지대로 rename을 시켜봐도 에러가 떴습니다.

구글 검색으로, 저와 비슷한 문제에 대한 해결책을 찾지 못했습니다.
그리고, 저 에러 발생 후에, ide에서 Hello, world에 대한 텍스트를 아무렇게나 수정이 하더라도,
android 시뮬레이터에는 아무런 변화가 없었습니다.

ide를 끄거나, 시뮬레이터를 끄거나, expo 를 재시작해도
시뮬레이터에는 Hello, world만 입력이 된 채 렌더링에 변화가 없습니다.

생성한 시뮬레이터를 완전히 삭제하고, 새로 시뮬레이터를 설치하면은 다시 Open~~메세지부터 출력할 수 있지만,
다시 styled-components를 설치하려고 하면 위와 같은 에러가 다시 뜹니다.

이와 관련한 해결책이 있을까요?
(리액트 네이티브를 사용하는 것이 아닌, 다른 프로젝트에서는 이런 에러가 발생하지 않았습니다)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions