Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

خطا ERROR Cannot read properties of undefined (reading 'pushScopeId') #2

Open
hamzehparsi opened this issue Sep 7, 2024 · 0 comments

Comments

@hamzehparsi
Copy link

hamzehparsi commented Sep 7, 2024

با سلام و احترام
این خطا موقع استفاده از نسخه "@neshan-maps-platform/vue3-openlayers": "^2.0.1",

در هنگام استفاده در کامپوننت vue میدهد (nuxt)

500
Cannot read properties of undefined (reading 'pushScopeId')

at /D:/nuxt-app/nuxt-app/node_modules/@neshan-maps-platform/vue3-openlayers/dist/neshan-ol-vue-sdk.umd.js:1:32992
at /D:/nuxt-app/nuxt-app/node_modules/@neshan-maps-platform/vue3-openlayers/dist/neshan-ol-vue-sdk.umd.js:1:282
at /D:/nuxt-app/nuxt-app/node_modules/@neshan-maps-platform/vue3-openlayers/dist/neshan-ol-vue-sdk.umd.js:1:299
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async ViteNodeRunner.interopedImport (/D:/nuxt-app/nuxt-app/node_modules/vite-node/dist/client.mjs:421:28)
at async ViteNodeRunner.directRequest (/D:/nuxt-app/nuxt-app/node_modules/vite-node/dist/client.mjs:280:24)
at async ViteNodeRunner.cachedRequest (/D:/nuxt-app/nuxt-app/node_modules/vite-node/dist/client.mjs:206:14)
at async ViteNodeRunner.dependencyRequest (/D:/nuxt-app/nuxt-app/node_modules/vite-node/dist/client.mjs:259:12)

این هم پکیج ها
"dependencies": {
"@neshan-maps-platform/vue3-openlayers": "^2.0.1",
"@nuxt/ui": "^2.18.4",
"nuxt": "^3.13.0",
"typescript": "^5.5.4",
"vue": "latest"
},
"devDependencies": {
"@iconify-json/hugeicons": "^1.2.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.44",
"tailwindcss": "^3.4.10"
}

این هم کد کامپوننت

<script setup lang="ts"> import NeshanMap from "@neshan-maps-platform/vue3-openlayers" import { ref, watch } from "vue" const mapKey = "web.12c3cabe08bc43cc847903be76e1242c" // const serviceKey = "Your_SERVICE_KEY" const mapRef = ref>() watch( () => mapRef.value?.state.map, (nv, ol) => { if (ol) return setTimeout(() => { mapRef.value?.state.map?.setMapType("standard-night") if (mapRef.value?.state.mapType) mapRef.value.state.mapType = "standard-night" }, 2000) // setTimeout(() => { // mapRef.value?.search({ // term: "ولی عصر", // coords: [51.36281969540723, 35.69672648316882], // }) // }, 3000) } ) </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant