J'ai mis à jour mon projet d'angular-5.x à angular-6.x et il a commencé à donner l'erreur suivante et même la création de la variable globale fictive ne fonctionne pas comme indiqué ici. Angular 6 Auth0 - global non défini
L'erreur est la suivante :
Uncaught ReferenceError: global is not defined
at Object../node_modules/has-binary2/index.js (index.js:10)
at __webpack_require__ (bootstrap:81)
at Object../node_modules/socket.io-parser/index.js (index.js:8)
at __webpack_require__ (bootstrap:81)
at Object../node_modules/socket.io-client/lib/index.js (index.js:7)
at __webpack_require__ (bootstrap:81)
at Object../src/app/app4pc/apiConnection/services/ApiConnectionServer.ts (auth.interceptor.ts:8)
at __webpack_require__ (bootstrap:81)
at Object../src/app/app4pc/apiConnection/toServer.module.ts (ApiConnectionServer.ts:11)
at __webpack_require__ (bootstrap:81)
Après avoir résolu ce problème, je reçois l'erreur suivante :
Uncaught ReferenceError: process is not defined
at Object../node_modules/process-nextick-args/index.js (index.js:3)
at __webpack_require__ (bootstrap:81)
at Object../node_modules/readable-stream/lib/_stream_readable.js (_stream_readable.js:26)
at __webpack_require__ (bootstrap:81)
at Object../node_modules/readable-stream/readable-browser.js (readable-browser.js:1)
at __webpack_require__ (bootstrap:81)
at Object../node_modules/simple-peer/index.js (index.js:7)
at __webpack_require__ (bootstrap:81)
at Object../src/app/util/services/call.services.ts (notification.service.ts:12)
at __webpack_require__ (bootstrap:81)
Et ça continue encore et encore.
0 votes
Vérifiez la version de votre CLI : github.com/angular/angular-cli/issues/8160
0 votes
Au cas où quelqu'un rencontrerait cette erreur avec ng 6 et AWS cognito, j'ai trouvé une solution de contournement, décrite ici : stackoverflow.com/a/50377270/2398593