IGNF / geoportal-sdk

French Geoportal SDK Javascript
Other
31 stars 13 forks source link

Impossible de compiler après l'ajout du package @ignf-geoportal/sdk-2d #43

Closed auri179 closed 5 years ago

auri179 commented 5 years ago

J'utilisait avant la version Geoportal-sdk de npm qui marchait correctement. J'ai besoin de mettre à jour vers la nouvelle version du SDK. Mais lorsque j'installe le package par NPM j'ai plein d'erreurs de dépendances.

J'ai ajouté les dépendances "geoportal-extensions-openlayers": "^2.1.2", "itowns": "^2.9.0", "openlayers": "^4.6.5",

Toujours des erreurs de modules non résolus comme : Request Xmldom

J'ai ajouté les modules suivants "@types/request": "^2.48.1", "@types/xmldom": "^0.1.29",

J'ai ensuite plein d'autres erreurs ERROR in ../node_modules/aws-sign2/index.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\aws-sign2' ERROR in ../node_modules/ecc-jsbn/index.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\ecc-jsbn' ERROR in ../node_modules/http-signature/lib/verify.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\http-signature\lib' ERROR in ../node_modules/http-signature/lib/signer.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\http-signature\lib' ERROR in ../node_modules/request/lib/helpers.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\lib' ERROR in ../node_modules/request/lib/hawk.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\lib' ERROR in ../node_modules/request/lib/oauth.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\lib' ERROR in ../node_modules/request/node_modules/aws4/aws4.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\node_modules\aws4' ERROR in ../node_modules/request/node_modules/oauth-sign/index.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\node_modules\oauth-sign' mERROR in ../node_modules/sshpk/lib/fingerprint.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/signature.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/private-key.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/certificate.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/identity.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/key.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/utils.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/dhe.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib' ERROR in ../node_modules/sshpk/lib/formats/ssh-private.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib\formats' ERROR in ../node_modules/sshpk/lib/formats/pem.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib\formats' ERROR in ../node_modules/sshpk/lib/formats/openssh-cert.js Module not found: Error: Can't resolve 'crypto' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\sshpk\lib\formats' ERROR in ../node_modules/request/lib/har.js Module not found: Error: Can't resolve 'fs' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\lib' ERROR in ../node_modules/forever-agent/index.js Module not found: Error: Can't resolve 'http' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\forever-agent' ERROR in ../node_modules/http-signature/lib/signer.js Module not found: Error: Can't resolve 'http' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\http-signature\lib' ERROR in ../node_modules/request/request.js Module not found: Error: Can't resolve 'http' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request' ERROR in ../node_modules/tunnel-agent/index.js Module not found: Error: Can't resolve 'http' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\tunnel-agent' ERROR in ../node_modules/forever-agent/index.js Module not found: Error: Can't resolve 'https' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\forever-agent' ERROR in ../node_modules/request/request.js Module not found: Error: Can't resolve 'https' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request' ERROR in ../node_modules/tunnel-agent/index.js Module not found: Error: Can't resolve 'https' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\tunnel-agent' ERROR in ../node_modules/forever-agent/index.js Module not found: Error: Can't resolve 'net' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\forever-agent' ERROR in ../node_modules/request/node_modules/tough-cookie/lib/cookie.js Module not found: Error: Can't resolve 'net' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\node_modules\tough-cookie\lib' ERROR in ../node_modules/tunnel-agent/index.js Module not found: Error: Can't resolve 'net' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\tunnel-agent' ERROR in ../node_modules/request/node_modules/mime-types/index.js Module not found: Error: Can't resolve 'path' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request\node_modules\mime-types' ERROR in ../node_modules/forever-agent/index.js Module not found: Error: Can't resolve 'tls' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\forever-agent' ERROR in ../node_modules/tunnel-agent/index.js Module not found: Error: Can't resolve 'tls' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\tunnel-agent' ERROR in ../node_modules/request/request.js Module not found: Error: Can't resolve 'zlib' in 'C:\temp\sources\Hebert.Applications.Gsica\Hebert.Applications.Gsica\node_modules\request'

Avez-vous une liste des dépendances à installer car je n'arrive plus à utiliser les services geoportail avec la nouvelle version ?

Merci d'avance

auri179 commented 5 years ago

J'ai essayé d'installer des modules un à un mais rien n'y fait

lowzonenose commented 5 years ago

Bonjour, vous êtes sur une installation du SDK dans un framework du type "Web Framework Front-End JS", tels que Angular, React, Ember, Meteor, Vue... Je vous renvoie vers le projet suivant : https://github.com/IGNF/geoportal-third-party-integration (exemples d'intégration des API Géoportail dans différents Frameworks)

Pour info, la solution devrait se trouver dans le sous projet https://github.com/IGNF/geoportal-third-party-integration/tree/master/simple-map-openlayers-angular (cf. README)

auri179 commented 5 years ago

Merci pour l'info, c'est ce que je cherchais