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

Could not resolve "ol/source/Stamen" #245

Closed
kankantian opened this issue Sep 5, 2023 · 1 comment
Closed

Could not resolve "ol/source/Stamen" #245

kankantian opened this issue Sep 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kankantian
Copy link

vue3-openlayers version 1.2.1

Could not resolve "ol/source/Stamen"

    node_modules/.pnpm/registry.npmmirror.com+vue3-openlayers@1.2.0_nvpfb7uzosno3su6d7vhhy5xwe/node_modules/vue3-openlayers/dist/vue3-openlayers.es.js:45:19:
      45 │ import Stamen from "ol/source/Stamen";
         ╵                    ~~~~~~~~~~~~~~~~~~

  You can mark the path "ol/source/Stamen" as external to exclude it from the bundle, which will
  remove this error.

D:\workspace\sz\gk-app\node_modules\.pnpm\registry.npmmirror.com+esbuild@0.18.20\node_modules\esbuild\lib\main.js:1649
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
node_modules/.pnpm/registry.npmmirror.com+vue3-openlayers@1.2.0_nvpfb7uzosno3su6d7vhhy5xwe/node_modules/vue3-openlayers/dist/vue3-openlayers.es.js:45:19: ERROR: Could not resolve "ol/source/Stamen"
    at failureErrorWithLog (D:\workspace\sz\gk-app\node_modules\.pnpm\registry.npmmirror.com+esbuild@0.18.20\node_modules\esbuild\lib\main.js:1649:15)
    at D:\workspace\sz\gk-app\node_modules\.pnpm\registry.npmmirror.com+esbuild@0.18.20\node_modules\esbuild\lib\main.js:1058:25
    at D:\workspace\sz\gk-app\node_modules\.pnpm\registry.npmmirror.com+esbuild@0.18.20\node_modules\esbuild\lib\main.js:1525:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 19,
        file: 'node_modules/.pnpm/registry.npmmirror.com+vue3-openlayers@1.2.0_nvpfb7uzosno3su6d7vhhy5xwe/node_modules/vue3-openlayers/dist/vue3-openlayers.es.js',
        length: 18,
        line: 45,
        lineText: 'import Stamen from "ol/source/Stamen";',
        namespace: '',
        suggestion: ''
      },
      notes: [
        {
          location: null,
          text: 'You can mark the path "ol/source/Stamen" as external to exclude it from the bundle, which will remove this error.'
        }
      ],
      pluginName: '',
      text: 'Could not resolve "ol/source/Stamen"'
    }
  ],
  warnings: []
}
@kankantian kankantian added the bug Something isn't working label Sep 5, 2023
@d-koppenhagen
Copy link
Collaborator

This happens, when using an incompatible OpenLayers version (OpenLayers 8 I assume). I released a pre-release with support for OpenLayers 8 which includes several breaking changes. Check out the release notes here:
https://github.com/MelihAltintas/vue3-openlayers/releases/tag/v2.0.0-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants