-
Notifications
You must be signed in to change notification settings - Fork 115
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
Doesn't work in Angular / Web #1242
Comments
I would recommend to compare backend and web TypeScript settings, in particular:
|
Hi all, |
You can also try to downgrade typescript libraries; I've seen the same errors after upgrading to the last versions: |
@AndreasGassmann After a lot of time spent with the same issue in Angular I came to a bunch of conclusions:
|
As part of the Mina Navigators Hackathon, we built a project with multiple components. We used
o1js
successfully in the backend to create and deploy a contract. However, we struggled to useo1js
in a frontend, created with the Angular framework.After doing
npm i o1js
and trying to use it, this was the error:Error message
I then tried to import the
web
part directly, but there were even more errors.Error message
So I went back to the original
import { PublicKey } from 'o1js'
and fixed the error. There seem to be some invalid paths, which I was able to address by creating this script:With this "fix", I was able to run the page. However, there were some new errors:
And also this:
But even with those errors,
o1js
seems to work as it was able to create a PublicKey. I then went ahead and imported theSmartContract
class I created, but then the whole thing breaks completely, again.That's the contract I tried to interact with:
https://github.com/Acurast/mina-zkoracles/blob/main/contracts/src/AcurastPriceOracle.ts#L47
That's where I gave up and used the GraphQL API to fetch the contract state.
Another part of our application is that we would like to deploy a smart contract directly from the frontend. For this, it seems we could use
SmartContract.compile()
together withSmartContract.deploy(...)
.Any help would be appreciated.
PS: There is another issue open about issues with Angular, but I don't think it's directly related, so I opened a new one: #910
The text was updated successfully, but these errors were encountered: