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

Support for the experimental syntax 'importAssertions' isn't currently enabled (50:80): #192

Open
awais-kaleem-blocksdev opened this issue Sep 4, 2023 · 2 comments

Comments

@awais-kaleem-blocksdev
Copy link

awais-kaleem-blocksdev commented Sep 4, 2023

i am unable to import package an getting error:
Compiled with problems:
ERROR in ./node_modules/@curvefi/api/lib/boosting.js

50 | import feeDistributorViewABI from "./constants/abis/fee_distributor_view.json" assert { type: 'json' };


this issue is happening with react js, but not ni node js server.
it looks there is something with bable.


here is environment i am using:
react : v18.2.0
node: v18.17.1
tsx: v5.2.2
"@curvefi/api": "2.46.3",


modified pkg json by adding flag in react script:
"scripts": {
"dev": "node scripts/start.js --experimental-import-assertions",
"start": "serve -s build --experimental-import-assertions",
"build": "node scripts/build.js --experimental-import-assertions",
"test": "node scripts/test.js"
},

@awais-kaleem-blocksdev
Copy link
Author

error reproduced by code is here:
import curve from "@curvefi/api";
await curve.init("Infura", { network: "", apiKey: '' }, { chainId: 1 });

@bankaholic
Copy link

Very helpful, I learned a lot fromt his Repository

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