Comments (12)
That is weird. I’m not sure why I removed it.
I’ll track down the commit history, but I certainly have no issue exporting it in the next minor bump.
from ethers.js.
Just re-opening so I don’t forget for the next minor-bump. :)
from ethers.js.
I just noticed - the export is, in fact, misspelled! It should be CommunityResourceable, not CommunityResourcable.
from ethers.js.
Quick update - I think I understand why this interface was commented out. Even after exporting it from providers/index.ts and ethers.ts, it just won't import for some reason. Live replit link using my patched version of ethers. Until this is actually fixed and CommunityResourceable becomes a valid import, could I trouble you to remove the minor-bump label? Thanks!
from ethers.js.
I don’t have a replit account, so I can’t see the link.
what is the error you get when trying to import it? Are you exporting it as a type and importing it as a type?
from ethers.js.
Both
import { CommunityResourceable } from "ethers";
and
import type { CommunityResourceable } from "ethers";
![Screen Shot 2024-06-27 at 5 53 06 PM](https://private-user-images.githubusercontent.com/44917034/343990777-f5825810-4816-49a9-b615-659aa326e7fa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3Njc4ODIsIm5iZiI6MTcxOTc2NzU4MiwicGF0aCI6Ii80NDkxNzAzNC8zNDM5OTA3NzctZjU4MjU4MTAtNDgxNi00OWE5LWI2MTUtNjU5YWEzMjZlN2ZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE3MTMwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyMWEwYjI1ZjEwZTY5ZWVkZTNiMWZjYjVlMWIxNTZiOGE5ZjBkODljNzU4ZTNjZmJjMTBjMTNjZGZkNjZiZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.63AfcjpTHOpOiszdUjzUixcBrgZ7xDHclMmbu3WEB3Y)
![Screen Shot 2024-06-27 at 5 53 33 PM](https://private-user-images.githubusercontent.com/44917034/343990911-f65079c6-3370-4e84-91a2-886274c2f6c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3Njc4ODIsIm5iZiI6MTcxOTc2NzU4MiwicGF0aCI6Ii80NDkxNzAzNC8zNDM5OTA5MTEtZjY1MDc5YzYtMzM3MC00ZTg0LTkxYTItODg2Mjc0YzJmNmM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE3MTMwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ0OTE3MmEyNGVhNjMyY2E4N2VkNDY1YzE0YWYwNmE1NDdlMDUyMjgwN2UwYzZiYzk3ZDczYzUyM2YzMTNlNGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Es3e7N-SyqDO4SiuYz-POKdYRDA1V7IzkVG1cbmxh7E)
Don't work :(
(installed using `npm install github:aaronzshey/ethers.js)
It is exported as a type! Here and here
This is quite strange, because importing other types, such as Networkish
or WebSocketLike
doesn't work.
from ethers.js.
Oh! After making the changes are you updating the dist files for both cjs and esm for your tests? npm run build-clean
should build what you need. Can you check the imported files that it is present there?
from ethers.js.
What's really strange is that npm run build
was working fine for me earlier. But after updating src.ts/ethers.ts, it stopped working and I would get these errors:
node_modules/@types/node/globals.d.ts(385,15): error TS2300: Duplicate identifier 'Response'.
node_modules/@types/node/globals.d.ts(386,9): error TS2300: Duplicate identifier 'Response'.
node_modules/@types/node/globals.d.ts(399,15): error TS2300: Duplicate identifier 'Headers'.
node_modules/@types/node/globals.d.ts(400,9): error TS2300: Duplicate identifier 'Headers'.
src.ts/utils/geturl-browser.ts(9,11): error TS2300: Duplicate identifier 'Headers'.
src.ts/utils/geturl-browser.ts(14,11): error TS2300: Duplicate identifier 'Response'.
src.ts/utils/geturl-browser.ts(71,13): error TS2740: Type 'Response' is missing the following properties from type 'Response': ok, type, url, redirected, and 7 more.
and then lib.commonjs and lib.esm would each only have two files: package.json
and README.md
. Is there a build requirement I've missed
from ethers.js.
There shouldn’t be, that I can think of. Are there any changes to the ts config? Is it using the pegged version of ts? That error certainly seems weird…
from ethers.js.
![Screen Shot 2024-06-27 at 6 13 33 PM](https://private-user-images.githubusercontent.com/44917034/343994622-ca0a0ab1-346c-4a43-a4cd-7c8f1e6288f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3Njc4ODIsIm5iZiI6MTcxOTc2NzU4MiwicGF0aCI6Ii80NDkxNzAzNC8zNDM5OTQ2MjItY2EwYTBhYjEtMzQ2Yy00YTQzLWE0Y2QtN2M4ZjFlNjI4OGY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE3MTMwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkNmYwZjg5YWNiMmU1NWU5NWU0ZjI0MzJkOTNmMWE1NDEzMmQ2ZGQxYzc0M2NiZTdlMjhmMmIzZWYyZmM2YTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8tTblGuY0_nFtZIIH7lXgjWAzIb9wKAbch6sKeaswhU)
A quick diff check of the configs - doesn't look like it. I'll go through the versions right now and see if anything looks amiss.
from ethers.js.
Okay, great thought about the changes to config files. In package-lock, @types/node was bumped from 18.15.13 -> 20.14.9, probably because I just installed typescript today. I'll revert these versions and keep you updated.
from ethers.js.
Commit 21731f9 resolves #4776 - the issues were in my tsconfig files, and the @types/node version. CommunityResourceable
is now present in cjs and esm, and can be imported using import { CommunityResourceable } from "ethers"
or import type { CommunityResourceable } from "ethers"
. Looking forwards to the next minor release!
from ethers.js.
Related Issues (20)
- unknown fragment HOT 1
- Expose encodeFunctionData and decodeFunctionResult as properties on the contract method HOT 1
- Property 'utils' does not exist on type 'typeof
- After the network is switched, the latest provider cannot be obtained HOT 2
- returns code BAD_DATA instead of INSUFFICIENT_FUNDS HOT 1
- Should return code TIMEOUT instead of UNKNOWN_ERROR HOT 1
- 'contract runner does not support calling' error HOT 1
- Not able to resolve module `@adraffy/ens-normalize`
- could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2) HOT 4
- QuickNodeProvider does not work HOT 1
- Error with effectiveGasPrice using Rabby wallet on BNB chain
- Logs not parsed with event parameter names, even though specified in the ABI
- RPC call add timeout
- Fallbackprovider using second rpc despite having reached quorum.
- RLP encoding negative numbers HOT 3
- request support for rpc method `eth_getBlockReceipts`
- When calling the contract transferFrom method, gas cannot be calculated
- Arbitrum tx inferTypes error: priorityFee cannot be more than maxFee
- typo - change "gloabal" to "global" in docs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethers.js.