county-of-simcoe-gis/SimcoeCountyWebViewer

Module not found: Can't resolve 'txml/txml'

sjyangkevin opened this issue · 1 comments

Hi,

I encountered an issue of Failed to compile when I tried to run the application with npm start. Before running the code, I already ran npm install to install all the dependencies. Below is the versions of Node and NPM that I used.

node: v14.17.4
npm: 6.14.14

and below is the full description of the error:

image

If you also noticed this issue and have no a solution for it. A temporary solution to this problem is to modify the file ./node_modules/geotiff/src/geotiffimage.js by changing the code on the 4-th line from import { parse } from 'txml/txml'; to import { parse } from 'txml/dist/txml';

image

I am also not very sure about whether the problem is caused by the geotiff package or by any other thing. It would be great if the problem can be resolved.

Thanks,

It looks like the OL package 6.7.x and up include geotiff 1.0.6 which has a bad reference to txml. The lastest version of geotiff 1.0.8 (published yesterday) removes that reference, but ol relies on a 1.0.6.

Until ol updates their dependencies I’ve set our package version to 6.6.x, which is the latest version that doesn’t include geotiff.
If you've already run the install and just wants to fix it “npm install ol@6.6.1” should resolve the issue.