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.

Build failing after geotiff release 2.0.5

See original GitHub issue

We use OpenLayers as a dependency (which uses geotiff as dependency "geotiff": "^2.0.2") and our builds started failing (Jest transform issue) after the very recent 2.0.5 release of geotiff. It works if I declare the older 2.0.4 version to be used on our dependencies: https://github.com/oskariorg/oskari-frontend/pull/1779.

Any suggestions on how to fix this to work with geotiff 2.0.5?

Here’s what Jest reports on our CI build:

FAIL bundles/mapping/mapmodule/plugin/markers/MarkersPlugin.ol.test.js
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /home/runner/work/oskari-frontend/oskari-frontend/node_modules/geotiff/node_modules/quick-lru/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export default class QuickLRU extends Map {
                                                                                      ^^^^^^

    SyntaxError: Unexpected token 'export'

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:[172](https://github.com/oskariorg/oskari-frontend/runs/5641986611?check_suite_focus=true#step:6:172)8:14)
      at Object.<anonymous> (node_modules/geotiff/dist-module/source/blockedsource.js:1:1)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mmomtchevcommented, Mar 26, 2022
1reaction
mmomtchevcommented, Mar 27, 2022

@constantinius you can probably bump the quick-lru version number in your package.json but since you are using semver ^, a new install will use the new version anyway

Read more comments on GitHub >

github_iconTop Results From Across the Web

v2.0.5 is a breaking change for CommonJS users #301 - GitHub
I think the code in v2.0.5 is a breaking change for CommonJS users, such as my organization. The underlying cause is because of...
Read more >
[gdal-dev] Gdaladdo error
Hi, I am trying to build overviews for 100+ geotiff and tiff files. Gdaladdo only screws up on a handful. Can anyone tell...
Read more >
geotiff - npm
GeoTIFF image decoding in JavaScript. Latest version: 2.0.7, last published: 2 months ago. Start using geotiff in your project by running ...
Read more >
Untitled
Initial man page for pahole - New release - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - New upstream release - Fix build failure on ...
Read more >
Sen2Cor Software Release Note - STEP
Evolution since release 2.0.5 . ... processor and to select the needed GIPP to construct Sen2Cor sensitivity curve to a particular parameter ...
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