Closed glacier-bot closed 3 months ago
When I tried to import gdal-async in a Vue3+Vite project, I got this error.
[ERROR] No loader is configured for ".html" files: node_modules/.store/gdal-async@3.8.5/node_modules/gdal-async/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html node_modules/.store/gdal-async@3.8.5/node_modules/gdal-async/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21: 86 │ return require('./' + command)(self, argvx, callback);
Then I checked out the contents of index.html and found that index.html seems to be a test file.
index.html
<script setup lang="ts"> import gdal from 'gdal-async' const dataset = gdal.open('test.shp') </script>
I wonder if it is necessary for this index.html to be in the latest release version.
"gdal-async": "^3.8.5" "vite": "^5.0.12" "vue": "^3.4.15"
"gdal-async": "^3.8.5"
"vite": "^5.0.12"
"vue": "^3.4.15"
gdal-async is a Node.js native library, it does not work in the browser
gdal-async
Description
When I tried to import gdal-async in a Vue3+Vite project, I got this error.
Then I checked out the contents of
index.html
and found thatindex.html
seems to be a test file.Codes
Suggestion
I wonder if it is necessary for this
index.html
to be in the latest release version.Dependencies
"gdal-async": "^3.8.5"
"vite": "^5.0.12"
"vue": "^3.4.15"