Giter VIP home page Giter VIP logo

Comments (10)

constantinius avatar constantinius commented on June 13, 2024 1

Hi @vincentsarago!
Thanks for reporting this issue. Throughout the project I'm using the new ES module syntax (import/export), which can be easily translated to something more widely supported using babel. I've planned to do this anyhow but it simply dropped under the table, thanks for reminding me.

I'll include this in the next beta (doing this now, should just take a couple of minutes).

from geotiff.js.

constantinius avatar constantinius commented on June 13, 2024 1

Hi @vincentsarago,

I fixed the issue, by adding a new source using nodes http API. Please upgrade to v1.0.0-beta.3, and you should be good to go.

Thanks for the beta-testing and sorry for the inconvenience!

from geotiff.js.

vincentsarago avatar vincentsarago commented on June 13, 2024

Thanks @constantinius 🙏

from geotiff.js.

constantinius avatar constantinius commented on June 13, 2024

Hi @vincentsarago

v1.0.0-beta.2 is now out. Could you please re-install geotiffjs and try again? Thanks.

from geotiff.js.

vincentsarago avatar vincentsarago commented on June 13, 2024

Thanks

I have now another error :-(

npm install geotiff -g
/Users/vincentsarago/.nvm/versions/node/v6.10.3/lib
└─┬ [email protected]
  ├── [email protected]
  └── [email protected]

 (py4) ~  npm link geotiff
/Users/vincentsarago/node_modules/geotiff -> /Users/vincentsarago/.nvm/versions/node/v6.10.3/lib/node_modules/geotiff
 (py4) ~  node
> const GeoTIFF = require('geotiff');
Error: Cannot find module 'babel-runtime/helpers/possibleConstructorReturn'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/vincentsarago/.nvm/versions/node/v6.10.3/lib/node_modules/geotiff/dist/geotiff.js:8:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

[SOLVED]
fixed by doing npm install babel-runtime && npm link babel-runtime

from geotiff.js.

vincentsarago avatar vincentsarago commented on June 13, 2024

on a similar subject,
I'm hitting another error while trying to access a web hosted file.

> const GeoTIFF = require('geotiff');
undefined
> const GeoTIFF = require('geotiff');
> url = 'http://landsat-pds.s3.amazonaws.com/c1/L8/017/034/LC08_L1TP_017034_20180417_20180501_01_T1/LC08_L1TP_017034_20180417_20180501_01_T1_B1.TIF'
'http://landsat-pds.s3.amazonaws.com/c1/L8/017/034/LC08_L1TP_017034_20180417_20180501_01_T1/LC08_L1TP_017034_20180417_20180501_01_T1_B1.TIF'
> GeoTIFF.fromUrl(url).then(data => {a = data}).catch(err => {console.log(err)});
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }
> ReferenceError: XMLHttpRequest is not defined

seems that XMLHttpRequest is a built-in object in web browsers while it doesn't exist in nodejs : http://zuga.net/articles/node-errors-referenceerror-xmlhttprequest-is-not-defined/

Don't really have a solution for this right now :-(

from geotiff.js.

constantinius avatar constantinius commented on June 13, 2024

Huh, that is an issue. I thought that the fetch API was preferred. Okay, I'll see what I can do, hopefully, I'll be able to fix this today.

from geotiff.js.

vincentsarago avatar vincentsarago commented on June 13, 2024

Thanks @constantinius

from geotiff.js.

constantinius avatar constantinius commented on June 13, 2024

@vincentsarago, in the meantime, you could use this package

I think it adds a global fetch method if not prevalent, which in turn should prevent the error you are seeing.

from geotiff.js.

vincentsarago avatar vincentsarago commented on June 13, 2024

Thanks @constantinius everything seems to work fine now :-)

from geotiff.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.