3 November 2022
Installing nvm
Why: Have been using n
, which is much easier to install and to use. However, since it is a npm package
which may cause a circular dependency-like problem, I guess there is no harm to install nvm too. See more
Problem: Using brew
as always, followed the instruction popped up.
Solution: Thanks to this,
- Add
source $(brew --prefix nvm)/nvm.sh
to~/.zshrc
- Restart the terminal or
source ~/.zshrc
4 November 2022
Reverting back to n
Why: Can't believe I am reverting back to n
in only 1 day... CRANQ seems to be only working with n
, seemingly because n
always stores node in /usr/local/bin
when nvm
stores it in a user specific path (and with redirection), while CRANQ only recognizes /usr/local/bin
Lack of ETH
Why: Goerli is the only official testnet now after ETH Merge, as Rinkeby is depreciated.
Problem: Due to the above reason, Goerli gas fee 10x in 2 months causing contract deployment to be very "expensive". Talked to some devs, 2 months ago the average gas is 6Gwei * 6m for 1 contract. Now it is 60Gwei.
Solution:
useDApp setup
Problem: I run into opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ]
Solution:
- Downgrade your node to 16 or
- use
NODE_OPTIONS=--openssl-legacy-provider npm run react-app:start
. - If the above is troublesome, put
export NODE_OPTIONS=--openssl-legacy-provider
in~/.zshrc
first thennpm run react-app:start
. Ifexport...
doesn't work, dounset NODE_OPTIONS
first.
9 November 2022
Regex
Replace all HTML tags:replaceAll("\\<[^>]*>","")
Split by punctuation:.split("[\\p{Punct}\\s]+")
Top comments (0)