• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    해결됨

저장만 하면 에러가 뜹니다

21.06.12 17:26 작성 조회수 3.35k

0

영상을 본것과 같이 sampleDate에 값을 치고 중괄호 안에 sampleDate를 넣기만 하고 저장을 하면 오류가 뜹니다. 이 밖에도  알맞은 코드를 쳤는데도 저장만하면 오류가뜹니다. 하지만 비쥬얼코드를 끄고 다시킨다음 "npm run serve"를 치면 다시 됩니다. 

이유없이 저장만 하면 오류가 떠서 수업을 진행할 수가 없습니다. 제발 살려주십시오!

<template>
  <div>{{sampleData}}</div>
</template>
<script>
export default {
    name: '',
    components: {},
    data() {
        return {
            sampleData: '안녕하세요'
        };
    },
    setup() {},
    created() {},
    mounted() {},
    methods: {}
}
</script>
<style scoped>

</style>

6:1   error  Expected indentation of 2 spaces but found 4   indent

   7:1   error  Expected indentation of 2 spaces but found 4   indent

   8:1   error  Expected indentation of 2 spaces but found 4   indent

   8:9   error  Missing space before function parentheses      space-before-function-paren

   9:1   error  Expected indentation of 4 spaces but found 8   indent

  10:1   error  Expected indentation of 6 spaces but found 12  indent

  11:1   error  Expected indentation of 4 spaces but found 8   indent

  11:10  error  Extra semicolon                                semi

  12:1   error  Expected indentation of 2 spaces but found 4   indent

  13:1   error  Expected indentation of 2 spaces but found 4   indent

  13:10  error  Missing space before function parentheses      space-before-function-paren

  14:1   error  Expected indentation of 2 spaces but found 4   indent

  14:12  error  Missing space before function parentheses      space-before-function-paren

  15:1   error  Expected indentation of 2 spaces but found 4   indent

  15:12  error  Missing space before function parentheses      space-before-function-paren

  16:1   error  Expected indentation of 2 spaces but found 4   indent

  18:10  error  Newline required at end of file but not found  eol-last

✖ 17 problems (17 errors, 0 warnings)

  17 errors and 0 warnings potentially fixable with the `--fix` option.

답변 4

·

답변을 작성해보세요.

0

배건우님의 프로필

배건우

질문자

2021.06.12

모르겠어서 비쥬얼코드 지우고 다시 깔건데 프리티어는 깔지 말까요??

혹시 이것이 vscode들어갈때 마다 뜨는데 이것이 문제인가요?

Vetur can't find `package.json` in c:\Users\ASUS\Desktop\WEB만들기.

0

에러메시지가 eslint 에러입니다. 관련부분을 좀 찾아보시면 좋을것 같습니다.

지금 사용하시는 개발환경 문제인데, 이런 경우 메시지만 보고 도와드리건 너무 어렵구요. 

계속 해결이 안되시면 비주얼 스튜디오 코드 자체를 완전히 삭제하고 다시 설치 해보시면 좋을것 같습니다.

지금 에러 사항은 eslint는 삭제가 되었는데, eslint 설정 정보는 남아있어서 에러가 나는걸로 보이네요

0

배건우님의 프로필

배건우

질문자

2021.06.12

지우고 npm run serve친다음 페이지 들어가보니까 됐습니다. 하지만 안녕하세요를 치고 다른 문장으로 바꾸고 저장했더니 또 에러가 뜹니다. 진짜 미치겠습니다.

Failed to compile.

./src/views/Databinding.vue Module Error (from ./node_modules/eslint-loader/index.js): C:\Users\ASUS\Desktop\WEB만들기\vue-default\src\views\Databinding.vue 8:7 error Missing space before function parentheses space-before-function-paren 10:1 error Expected indentation of 6 spaces but found 4 indent 11:6 error Extra semicolon semi 13:8 error Missing space before function parentheses space-before-function-paren 14:10 error Missing space before function parentheses space-before-function-paren 15:10 error Missing space before function parentheses space-before-function-paren 21:9 error Newline required at end of file but not found eol-last ✖ 7 problems (7 errors, 0 warnings) 7 errors and 0 warnings potentially fixable with the `--fix` option.

0

비주얼 스튜디오 코드 확장 프로그램을 삭제해 보시겠어요?

Eslint나 formatter 같은 확장 프로그램 삭제해 보시면 좋을것 같아요.

에러 메시지만 보면 정확히 알 수는 없지만 설치되어 있는 확장 프로그램 관련해서 에러로 보입니다.