Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'TypeError: t.XMLHttpRequest is not a constructor' when using web3.min.js #2061

Closed
Alenius opened this issue Nov 21, 2018 · 1 comment
Closed

Comments

@Alenius
Copy link

Alenius commented Nov 21, 2018

Hello!

I am building an Azure function app with web3 for calling some smart contract. There is a problem with deploying to Azure using the web3-package because of scrypt. So instead i went for including web3.min.js like so:

const Web3 = require('./web3.min.js');

When I deploy this to Azure or run it locally i get the error:

 'TypeError: t.XMLHttpRequest is not a constructor'

This seems weird to me since the code is working fine otherwise. Does anyone have a workaround?

I have already tried the light version and the regular web3.js aswell.

When installing the package with npm and using it in the regular way it works locally but as stated above, the problem then arises when deploying to Azure, so I need some other way of doing it.

@Alenius Alenius changed the title x 'TypeError: t.XMLHttpRequest is not a constructor' when using web3.min.js Nov 21, 2018
@nivida
Copy link
Contributor

nivida commented Nov 28, 2018

This should be fixed with the PR #2000 please reopen this issue if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants