lorisleiva / solana-twitter

Simple tweets as Solana accounts
202 stars 58 forks source link

`anchor run test` throws `TypeError: mixin.wrap is not a function` #1

Open YikSanChan opened 2 years ago

YikSanChan commented 2 years ago

Walking thru https://lorisleiva.com/create-a-solana-dapp-from-scratch/getting-started-with-solana-and-anchor on my macOS (non M1). Everything goes well, except for:

$ anchor run test
yarn run v1.22.17
warning package.json: No license field
$ /Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/.bin/ts-mocha -p ./tsconfig.json -t 1000000 'tests/**/*.ts'
/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:2772
                throw err;
                ^

TypeError: mixin.wrap is not a function
    at /Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/cliui/build/index.cjs:169:33
    at Array.forEach (<anonymous>)
    at UI.rasterize (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/cliui/build/index.cjs:165:13)
    at UI.rowToString (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/cliui/build/index.cjs:95:14)
    at /Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/cliui/build/index.cjs:85:18
    at Array.forEach (<anonymous>)
    at UI.toString (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/cliui/build/index.cjs:84:19)
    at Object.help (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:1032:19)
    at Object.self.cacheHelpMessage (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:1072:34)
    at Object.runCommand (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:450:42)
    at Object.parseArgs [as _parseArgs] (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:2706:53)
    at Object.parse (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/yargs/build/index.cjs:2278:29)
    at Object.exports.main (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/mocha/lib/cli/cli.js:78:6)
    at Object.<anonymous> (/Users/yiksanchan/source/yiksanchan/solana-twitter/node_modules/mocha/bin/mocha:141:29)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any idea how to address this? Thanks!

lorisleiva commented 2 years ago

Hi πŸ‘‹

Thanks for raising this. I'm afraid I'm not sure why you'd get this error. I tried to Google it but not much came from it. I'll leave this open in case someone else can help. πŸ™

aleksander351 commented 1 week ago

came across this error, two general things I did, update nodejs to the latest version, and moved some compile package to package.json dependencies instead of devDependencies.