-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Test generated by anchor init yields error "Provider env is not available on browser." #1145
Comments
Also note that running the tests in the typescript directory in the main repo also has the same failure. https://github.com/project-serum/anchor/tree/master/tests/typescript |
Sorry to bump, but any comment would be appreciated. This is in the main release and a blocker for starting a new project with TypeScript. |
Hi managed to figure this out. For me it was the environment variable BROWSER was set to firefox. I cleared this environment variable by doing |
Would you mind expanding on this? I'm running into the same issue but am not sure where to |
Just run the command I wrote in the terminal before running anchor |
export BROWER= |
above comment is missing "S" in BROWSER. |
In most recent versions of anchor, the exported 'Provider' was moved to 'AnchorProvider'. Had the same issue, but this was the problem ! |
a little graceful command: unset BROWSER whatever, just make sure |
BROWSER= anchor test, or BROWSER='' anchor test |
Description:
The project created from anchor init throws an error when trying to run the generated test.
Reproduction:
Result:
Shows the following error:
The text was updated successfully, but these errors were encountered: