Build failing after geotiff release 2.0.5
See original GitHub issueWe 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:
- Created a year ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ZakarFin solved by https://github.com/sindresorhus/quick-lru/pull/39
@constantinius you can probably bump the
quick-lru
version number in yourpackage.json
but since you are using semver ^, a new install will use the new version anyway