question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to import geotiff in vue project

See original GitHub issue

I have import GeoTIFF from 'geotiff' in a vue file, and run npm run dev with the following error:

 error  in ./node_modules/geotiff/src/geotiff.js

Module parse failed: Unexpected token (283:35)
You may need an appropriate loader to handle this file type.
|     }
|
|     return usedImage.readRasters({ ...options, window: wnd });
|   }
| }

 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/layers/Basemap.vue 9:0-30
 @ ./src/components/layers/Basemap.vue
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Daniel-Brosnan-Blazquezcommented, Mar 2, 2022

I’m trying to install stable version of Opelayers 6.13.0 and I’m having the same issue as this depends on geotiff. It currently installs geotiff@2.0.4 and still gives the same error: ERROR in ./node_modules/geotiff/dist-module/geotiff.js Module parse failed: Unexpected token (276:35) You may need an appropriate loader to handle this file type. | } | | return usedImage.readRasters({ …options, window: wnd }); | } | }

1reaction
muetycommented, Jan 31, 2022

Same problem here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to import an API module into a nested component (Vue)
I've been struggling with a very odd bug(?) with regards to importing an API module into a nested component in a Vue app....
Read more >
JSDoc: Home - geotiff.js
geotiff.js works with both require , import and the global variable GeoTIFF : const GeoTIFF = require('geotiff'); const { fromUrl, fromUrls, fromArrayBuffer ...
Read more >
70 questions with answers in GEOTIFF | Science topic
You can import GEOTIFF using "image" file type in PETREL (the importing option is start with "bitmap") and assign coordinate on the setting...
Read more >
jest unexpected token 'export' uuid - You.com | The AI Search ...
Is anyone else having this error in an Angular project due to a 3rd party ... jest.config.ts import type {Config} from "@jest/types"; const...
Read more >
Failed to import geotiff in vue project - error - Insight
How to handle the openlayers error: Failed to import geotiff in vue project · You may need an appropriate loader to handle this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found