Closed ondrejrohon closed 7 years ago
+1
same issue
+1
To anyone encountering this problem there's a workaround. I've had the same problem when upgrading to webpack 2 and it seems to be caused by an incorrect compilation of reqwest module. Changing
presets: ['es2015', 'react']
to
presets: [['es2015', {modules:false}], 'react']
disables module compilation and allows you to use the library
I can confirm that changing this settings in .babelrc as @Bjornej wrote works.
Has this issue been fixed without the workaround?
Sadly no, as reqwest seems to be no longer mantained and the last commit dates back to 2015
and it looks like auth0 does not have it as a dependency anymore
While using Auth0-js library that has reqwest as a dependency I get this error: Uncaught TypeError: Cannot use 'in' operator to search for 'window' in undefined.
I'm using webpack in my setup with following config:
If I understand correctly, this on line 13 in reqwest.js is undefined because reqwest module is imported using webpack in a closure. Changing the line 13 in reqwest.js from
var context = this
tovar context = this || window || {}
fixes the issue. Do I have wrong configuration of webpack, or is reqwest module incorrectly defined? Thanks.