~/web3js/Stest ❯ truffle develop
This version of µWS is not compatible with your Node.js build:
Error: Cannot find module './uws_darwin_arm64_102.node'
Falling back to a NodeJS implementation; performance may be degraded.
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:135:10)
at hash160 (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:249:1)
at HDKey.set (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:50:1)
at Function.HDKey.fromMasterSeed (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:194:1)
at Function.fromMasterSeed (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/node_modules/ethereumjs-wallet/dist/hdkey.js:19:1)
at Object.getAccountsInfo (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/mnemonics/mnemonic.js:48:1)
at Object.module.exports [as run] (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/develop/run.js:39:1)
at runCommand (/Users/ara/.nvm/versions/node/v17.8.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/command-utils.js:190:1)
Truffle v5.5.27 (core: 5.5.27)
Node v17.8.0
위와 같은 에러가 발생했을 땐 간단하게 node version 을 변경하여 해결해주면 된다.
~/web3js/Stest ❯ nvm ls
v16.14.2
-> v17.8.0
v18.8.0
system
default -> 17.8.0 (-> v17.8.0)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v18.8.0) (default)
stable -> 18.8 (-> v18.8.0) (default)
lts/* -> lts/gallium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.20.0 (-> N/A)
lts/gallium -> v16.17.0 (-> N/A)
~/web3js/Stest ❯ nvm use v16.14.2
Now using node v16.14.2 (npm v8.5.0)