-
[Vue.js 3] vue/multi-word-component-names 오류 & Package.json 수정 권한 없음 오류오답 노트 2024. 4. 9. 12:14
Vue3로 구현된 FE Project를 수행하는 중이라 Vue에 대한 스터디의 필요성을 느끼게 되었습니다.
Vue3 강의를 들으며 코드를 구현해보니 이런 오류가 발생했습니다.
의미는 '왜 너 정해진 이름을 니맘대로 써? 문자 두 개 이상 합쳐서 써'였습니다.
즉, Header, Footer, Home과 같이 능히 많이 사용되는 이름의 Component는 선언하지 말고 word를 2개 이상 합쳐서 쓰라는 것이었습니다.
귀찮게하고있습니다...고쳐써 써보죠.
아래와 같이 vue.config.js를 수정했습니다.
const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true })
추가적으로 package.json의 rules에 multi word에 대한 설정 값을 0으로 변경해주었습니다.
...(생략)... "rules": { "vue/multi-word-component-names" : 0 } ...(생략)...
수정은 모두 끝났습니다.
이제 저장을..
갑자기 저장을 못하겠다는 문구를 띄우고 원래도로 돌리겠니 취소하겠니, 협박을 합니다.
저장이라는 선택지는 없습니다..
깡패도 이런 깡패가..
찾아보니 저장 관련 옵션을 빼주면 되더군요.
이후 저장을 해보니 매우 잘됩니다.
다시 npm으로 서버를 구동해보죠.
Done 입니다.
고생하셨습니다!
'오답 노트' 카테고리의 다른 글