나의 개발일지

[GitHub] 오류 : Module not found: Error: You attempted to import ../App.css which falls outside of the project src/ directory. 본문

Git & Github/ERROR

[GitHub] 오류 : Module not found: Error: You attempted to import ../App.css which falls outside of the project src/ directory.

heew0n 2023. 11. 6. 20:39

 

 

Module not found: Error: You attempted to import ../App.css which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/.

 

 

 

개인 과제 마무리 단계 중에 이런 위 문구의 오류가 자꾸 떴다.

검색해보니 CRA(create-react-app) 에서 컴파일은 src 내부에서만 일어나는데 

src 폴더 안에 app.css 파일이 들어가 있지 않아서 발생했던 것이었다

하지만...! 난 src 폴더 안에 잘 넣어놨는데요 ㅠㅠ...

내가 해결할 수 없는 부분인 것 같아서 튜터님께 달려가서 여쭤봤다

 

 

 

 

 

확인해보시더니 잘 들어간 게 맞다고

아마 vscode 버그인 거 같다고 다시 껐다 켜보니 마법처럼 에러가 뜨지 않았다!

근데 분명 나도 단순한 오류인 것 같아서 껐다 켜봤었는데 작동하지 않았었다.

역시 선생님 앞에서는 안되던 것도 잘 되는 그런 법칙이 존재하는 것 같다 ..

 

 

 

 

 

'Git & Github > ERROR' 카테고리의 다른 글

[GITHUB] 에러 발생 및 해결  (1) 2023.11.24