TypeError: Cannot read properties of undefined (reading 'slice')
at node_modules/readable-stream/lib/_stream_writable.js (@supermap_iclient-ol.js?v=3265d06d:4006:85)
at __require2 (chunk-S5KM4IGW.js?v=b074cef5:18:50)
at node_modules/readable-stream/readable-browser.js (@supermap_iclient-ol.js?v=3265d06d:5685:25)
at __require2 (chunk-S5KM4IGW.js?v=b074cef5:18:50)
at node_modules/from2/index.js (@supermap_iclient-ol.js?v=3265d06d:5695:20)
at __require2 (chunk-S5KM4IGW.js?v=b074cef5:18:50)
at node_modules/into-stream/index.js (@supermap_iclient-ol.js?v=3265d06d:5802:16)
at __require2 (chunk-S5KM4IGW.js?v=b074cef5:18:50)
at node_modules/@elastic/elasticsearch/lib/Transport.js (@supermap_iclient-ol.js?v=3265d06d:6217:22)
at __require2 (chunk-S5KM4IGW.js?v=b074cef5:18:50)
我在vite.config.js中加了
process: "process/browser",
stream: "stream-browserify",
// zlib: "browserify-zlib",
util: "util"
但还是不管用
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@supermap/iclient-ol": "^11.1.0",
"@turf/turf": "^6.5.0",
"@vueup/vue-quill": "1.1.0",
"@vueuse/core": "9.5.0",
"ant-design-vue": "^3.2.20",
"axios": "0.27.2",
"dayjs": "^1.11.8",
"dplayer": "^1.27.1",
"echarts": "^5.4.3",
"echarts-liquidfill": "^3.1.0",
"element-plus": "^2.3.5",
"element-pro-components": "^1.2.12",
"events": "^3.3.0",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
"js-cookie": "3.0.1",
"jsencrypt": "3.3.1",
"nprogress": "0.2.0",
"ol": "^6.14.1",
"os-browserify": "^0.3.0",
"pinia": "2.0.22",
"stream-browserify": "^3.0.0",
"util": "^0.12.4",
"vue": "3.2.45",
"vue-cropper": "1.0.3",
"vue-router": "4.1.4",
"vxe-table": "^4.4.1",
"xe-utils": "^3.5.11"
},
"devDependencies": {
"@supermap/babel-plugin-import": "0.0.1",
"@vitejs/plugin-vue": "3.1.0",
"@vue/compiler-sfc": "3.2.45",
"sass": "1.56.1",
"buffer": "^6.0.3",
"unplugin-auto-import": "0.11.4",
"vite": "3.2.3",
"vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-setup-extend": "0.4.0"
}