source

VueJs: TypeError: Object(...)가 함수가 아닙니다. "withScopeId"

goodcode 2022. 8. 27. 09:26
반응형

VueJs: TypeError: Object(...)가 함수가 아닙니다. "withScopeId"

최근 몇 주 동안 Vue 애플리케이션에 대한 업데이트를 성공적으로 푸시하고 있으며, 어제 몇 가지 극히 최소한의 변경(프로퍼티 이름 변경 및 일부 시멘틱 문자 삭제) 후 다음 오류가 발생했습니다.

Uncaught TypeError: Object(...) is not a function
    at Module.fae3 (XCustomerServiceOptionsLibrary.umd.js:53612)
    at n (XCustomerServiceOptionsLibrary.umd.js:30)
    at 0012 (XCustomerServiceOptionsLibrary.umd.js:94)
    at XCustomerServiceOptionsLibrary.umd.js:11
    at XCustomerServiceOptionsLibrary.umd.js:3
    at Object.e977 (XCustomerServiceOptionsLibrary.umd.js:1)
    at o (app.2df3392d.js:formatted:39)
    at CustomerServiceManagement.umd.js:3
    at Object.7091 (CustomerServiceManagement.umd.js:1)
    at o (app.2df3392d.js:formatted:39)

코드를 디버깅하여 다음 행에서 오류가 발생하였습니다.

const _withId = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withScopeId"])("data-v-569a422e")

Vue 컴포넌트를 라이브러리에 구축하여 Verdaccio repo에 푸시한 후 이를 더 큰 프로젝트에 종속적으로 추가합니다.질문의 라이브러리(XCustomerServiceOptionsLibrary더 큰 Vue 어플리케이션은 정상적으로 구축되지만 서비스 시 위의 오류가 발생합니다.

문제의 원인이 되고 있는 Vue 의존 관계 중 하나에 버전 변경이 있었던 것 같습니다.여기 소포입니다.json 파일:

도서관

"devDependencies": {
    "apollo-boost": "^0.4.4",
    "autoprefixer": "^9.6.1",
    "graphql": "^14.2.1",
    "material-design-icons-iconfont": "^5.0.1",
    "moment": "^2.24.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.2",
    "vue": "^2.6.11",
    "vue-apollo": "^3.0.0-beta.28",
    "vuetify": "^1.5.16",
    "vuex": "^3.0.1",
    "webpack": "^4.36.1",
    "@vue/cli": "^4.1.2",
    "@vue/cli-service": "^4.1.2",
    "vue-template-compiler": "^2.6.11"
  },

앱.

"apollo-boost": "^0.3.1",
    "autoprefixer": "^9.6.1",
    "graphql": "^14.2.1",
    "material-design-icons-iconfont": "^5.0.1",
    "moment": "^2.24.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.2",
    "vue": "^2.6.10",
    "vue-apollo": "^3.0.0-beta.28",
    "vuetify": "^1.5.16",
    "vuex": "^3.0.1",
    "webpack": "^4.36.1",
    "@vue/cli": "^4.1.2",
    "@vue/cli-service": "^4.1.2",
    "vue-template-compiler": "^2.6.11"

언급URL : https://stackoverflow.com/questions/63358960/vuejs-typeerror-object-is-not-a-function-withscopeid

반응형