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

Map loads in local, but does not load in azure dev environment #193

Open
gmjcbs opened this issue Jan 12, 2024 · 7 comments
Open

Map loads in local, but does not load in azure dev environment #193

gmjcbs opened this issue Jan 12, 2024 · 7 comments

Comments

@gmjcbs
Copy link

gmjcbs commented Jan 12, 2024

Application gives a console error:
Uncaught ReferenceError: Lp is not defined
at a5dd9fd3-ee46-4895-a171-214c0376c37f:1:7426
at a5dd9fd3-ee46-4895-a171-214c0376c37f:1:371118
when run in dev environment and and map does not load.
But it works fine in local.

Any suggestion!!!
Thanks in advance..

@yulinscottkang
Copy link
Contributor

Typically, this issue is caused by the minifier. You might want to experiment with the minifier configurations or consider using an alternative minifier to address this.

@mkuhnwildfiredefense
Copy link

I have a similar issue with the following error. We are using create-react-app, so its handling our production build and minification:

Uncaught ReferenceError: Cannot access '$' before initialization
at hl (8fcf8e19-4409-49ed-89b4-7805e265923d:1:244180)
at e.performSymbolLayout (8fcf8e19-4409-49ed-89b4-7805e265923d:1:319819)
at i.x (8fcf8e19-4409-49ed-89b4-7805e265923d:1:333163)
at 8fcf8e19-4409-49ed-89b4-7805e265923d:1:334277
at e.Actor.processTask (8fcf8e19-4409-49ed-89b4-7805e265923d:1:299263)
at ql.process [as _callback] (8fcf8e19-4409-49ed-89b4-7805e265923d:1:298420)
at MessageChannel._channel.port2.onmessage (8fcf8e19-4409-49ed-89b4-7805e265923d:1:272453)

What can be done to resolve this if using create-react-app???

Installed packages are:
"azure-maps-control": "^3.1.2",
"azure-maps-drawing-tools": "^1.0.3",
"azure-maps-spatial-io": "^0.1.8",

To reiterate the issue, our maps and layers work fine on a local dev env, but as soon as we deploy to QA env we are seeing the error and layers are not working. Base map does load.

Thanks

@yulinscottkang
Copy link
Contributor

I was able to reproduce and resolve the issue by updating the browserslist config in my package.json. Don't forget to remove the node_modules/.cache folder so that babel-loader can recognize the changes. You can either use ">0.3%" or add "not android 4.4.3-4.4.4". See this issue for the root cause.

@Mousa96
Copy link

Mousa96 commented Jul 23, 2024

@yulinscottkang I'm getting a similar issue and I tried the proposed solution but it's not working.

Installed packages:
"react-azure-maps": "^1.0.0",
"azure-maps-control": "^3.1.2",
"react": "^17.0.2",

@syst-doe
Copy link

syst-doe commented Jul 26, 2024

@Mousa96 were you able to resolve this error ? I am getting same issue, azure-maps-control works fine on local, but when i publish it on server it doesn't work well.

Local :
image

Prod:
image

using: "azure-maps-control": "^3.1.2" dependency.

error in console screenshot :

image

cc. @yulinscottkang

@DPid-ETI
Copy link

DPid-ETI commented Nov 12, 2024

I have same issue as syst-doe. Map is loading partly. Same error in console. Tried all methods of auth - didn't helped.

@vegerot12
Copy link

vegerot12 commented Dec 16, 2024

I am getting the issue with azure-maps-control too. And tried editing the browserslist, did cache clean, rebuild and tested . Still the same. Tried changing the minimizer and tried the mangle:false in terserOptions but nothing seems to work. If i disable minimize then it works but i dont want to consider it as a solution. Is there any workaround done here by anyone even if its not simple I am willing to try.

@dubiety dubiety reopened this Jan 9, 2025
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

8 participants