Subscribe on changes!

Uncaught SyntaxError: import not found: createElementBlock

avatar
Oct 24th 2021

Version

3.2.20

Reproduction link

sfc.vuejs.org/

Steps to reproduce

ive encounter some unknown error initially due to initial load error on a specific page, that my onmounted hook wasnt working. iam using latest script setup with typescript. Therefore ive upgraded my vite with:

"dependencies": {
    "@ant-design/icons": "^4.6.3",
    "@ant-design/icons-vue": "^6.0.1",
    "@vueuse/core": "^6.7.3",
    "ant-design-vue": "^2.2.8",
    "axios": "^0.22.0",
    "bson": "^4.5.0",
    "daisyui": "^1.13.2",
    "date-fns": "^2.23.0",
    "dayjs": "^1.10.6",
    "firebase": "^8.10.0",
    "firebase-key-encode": "git+https://github.com/u007/firebase-key-encode.git",
    "graphql": "^15.5.1",
    "graphql-tag": "^2.12.5",
    "ky": "^0.28.5",
    "loadjs": "^4.2.0",
    "moment": "^2.29.1",
    "string-similarity": "^4.0.4",
    "vite-plugin-ts": "^1.1.8",
    "vue": "^3.1.5",
    "vue-i18n": "^9.1.7",
    "vue-meta": "^3.0.0-alpha.2",
    "vue-router": "^4.0.10",
    "vue-types": "^4.0.1",
    "vuedraggable": "^4.0.3",
    "vuex": "^4.0.2",
    "vuex-persistedstate": "^4.0.0"
  },
  "devDependencies": {
    "@rollup/plugin-eslint": "^8.0.1",
    "@vitejs/plugin-vue": "^1.9.3",
    "@vue/compiler-sfc": "^3.2.20",
    "eslint-plugin-vue": "^7.16.0",
    "less": "^4.1.2",
    "postcss-windicss": "^1.0.0",
    "sass": "^1.43.3",
    "ts-node": "^10.2.1",
    "vite": "^2.6.10",
    "vite-plugin-style-import": "^1.2.1",
    "vite-plugin-voie": "^0.7.3",
    "vite-plugin-windicss": "^1.2.8",
    "windicss": "^3.1.7"
  },
  "optionalDependencies": {
    "@commitlint/cli": "latest",
    "@commitlint/config-conventional": "latest",
    "@types/node": "latest",
    "eslint-config-google": "latest",
    "eslint-formatter-friendly": "latest",
    "husky": "latest",
    "lint-staged": "latest",
    "lodash-es": "latest"
  },

after the update, i removed node_modules and dist folder, npm i, and npm run dev, im getting this error (basically nothing open now, all uri stop working, blank with error in console) when i do a shift refresh on browser, iam getting this error:

Loading failed for the module with source “https://127.0.0.1:3330/node_modules/.vite/chunk-EQ33ZHBU.js?v=d6d433a5”.

What is expected?

no error

What is actually happening?

Loading failed for the module with source “https://127.0.0.1:3330/node_modules/.vite/chunk-EQ33ZHBU.js?v=d6d433a5”.

avatar
Oct 24th 2021

Your project lockfile likely has Vue version locked at 3.1.*, while some component (from an npm package) requires Vue 3.2 (`createElement is only available in Vue 3.2 onwards).

Remove the lockfile & packagea and reinstall.

If you still have problems, asl for help on chat.vuejs.org.