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

npm linking layer-selector to another local project causes errors #127

Closed
stdavis opened this issue Aug 23, 2022 · 1 comment
Closed

npm linking layer-selector to another local project causes errors #127

stdavis opened this issue Aug 23, 2022 · 1 comment
Labels
bug Something isn't working layer-selector all things base map changing

Comments

@stdavis
Copy link
Member

stdavis commented Aug 23, 2022

When I use npm link to load the layer-selector into another local project on my machine, I get strange error messages in the console like this:

Accessor#set Assigning an instance of 'esri.Basemap' which is not a subclass of 'esri.Basemap'

When attempting to step through the code, I noticed two Basemap.js files; one from my local project and one from the kitchen sink project. I'm wondering if this is the cause of the issue. I'm not sure how to tell the browser (or maybe it's Vite?) to load only the arcgis module from my local project.

When I npm install the layer selector package, I don't have the issue.

Making this change fixes the issue but causes other issues in the unit tests:
image

@stdavis stdavis added bug Something isn't working layer-selector all things base map changing labels Aug 23, 2022
@stdavis
Copy link
Member Author

stdavis commented Feb 24, 2025

This looks like it can be solved by deduping in the vite config.

@stdavis stdavis closed this as completed Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working layer-selector all things base map changing
Projects
None yet
Development

No branches or pull requests

1 participant