import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import Viser from 'viser-vue'
const app = createApp(App)
app.use(Viser)
app.mount('#app')
三、浏览器访问错误信息
g2-plugin-slider.js:502 Uncaught TypeError: Cannot assign to read only property 'constructor' of object '#'
at _inheritsLoose (g2-plugin-slider.js:502)
at g2-plugin-slider.js:518
at Object. (g2-plugin-slider.js:914)
at webpack_require (g2-plugin-slider.js:30)
at Object. (g2-plugin-slider.js:96)
at webpack_require (g2-plugin-slider.js:30)
at Object. (g2-plugin-slider.js:80)
at __webpack_require__ (g2-plugin-slider.js:30)
at g2-plugin-slider.js:73
at g2-plugin-slider.js:74
一、package.json { "name": "vite-vise-test", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { "viser-vue": "^2.4.8", "vue": "^3.2.47" }, "devDependencies": { "@vitejs/plugin-vue": "^4.1.0", "vite": "^4.3.9" } } 二、main.js
import { createApp } from 'vue' import './style.css' import App from './App.vue' import Viser from 'viser-vue' const app = createApp(App) app.use(Viser) app.mount('#app')
三、浏览器访问错误信息
g2-plugin-slider.js:502 Uncaught TypeError: Cannot assign to read only property 'constructor' of object '#'
at _inheritsLoose (g2-plugin-slider.js:502)
at g2-plugin-slider.js:518
at Object. (g2-plugin-slider.js:914)
at webpack_require (g2-plugin-slider.js:30)
at Object. (g2-plugin-slider.js:96)
at webpack_require (g2-plugin-slider.js:30)
at Object. (g2-plugin-slider.js:80)
at __webpack_require__ (g2-plugin-slider.js:30)
at g2-plugin-slider.js:73
at g2-plugin-slider.js:74
四、nodejs版本
v16.19.1
五、npm版本8.19.3
错误信息如下