kevinfaveri/solana-candy-factory

Error: Cannot find module './candy-machine-cli.ts'

wjl8 opened this issue · 2 comments

wjl8 commented

An error occurred while I was running yarn setup dev:

Commitment: confirmed
[INFO] Sending airdrop
Requesting airdrop of 1 SOL

Signature: 34zyccUnVXAXa91Fe2ER33whZ2yafKkUm38xnugkw37AU2vSRz3bdUyvkCFur72vkzgPkRwPcib7SztMxRhCsPgS

1 SOL
$ node ./devtools/dev/setup-metaplex-dev.js
Type mint price [default 1 sol]:
Type start date of the minting [default 16 Sep 2021 00:00:00]:
[INFO] Cleaning older cache folder for metaplex
[INFO] Uploading all resources
internal/modules/cjs/loader.js:892
throw err;
^

Error: Cannot find module './candy-machine-cli.ts'
Require stack:

  • /home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.resolve (internal/modules/cjs/helpers.js:98:19)
    at requireResolveNonCached (/usr/local/lib/node_modules/ts-node/dist/bin.js:320:16)
    at getProjectSearchDir (/usr/local/lib/node_modules/ts-node/dist/bin.js:290:35)
    at main (/usr/local/lib/node_modules/ts-node/dist/bin.js:192:27)
    at Object. (/usr/local/lib/node_modules/ts-node/dist/bin.js:350:5)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript'
    ]
    }
    [INFO] Creating candy machine
    internal/modules/cjs/loader.js:892
    throw err;
    ^

Error: Cannot find module './candy-machine-cli.ts'
Require stack:

  • /home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.resolve (internal/modules/cjs/helpers.js:98:19)
    at requireResolveNonCached (/usr/local/lib/node_modules/ts-node/dist/bin.js:320:16)
    at getProjectSearchDir (/usr/local/lib/node_modules/ts-node/dist/bin.js:290:35)
    at main (/usr/local/lib/node_modules/ts-node/dist/bin.js:192:27)
    at Object. (/usr/local/lib/node_modules/ts-node/dist/bin.js:350:5)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript'
    ]
    }
    [INFO] Setting minting start date (goLiveDate)
    internal/modules/cjs/loader.js:892
    throw err;
    ^

Error: Cannot find module './candy-machine-cli.ts'
Require stack:

  • /home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.resolve (internal/modules/cjs/helpers.js:98:19)
    at requireResolveNonCached (/usr/local/lib/node_modules/ts-node/dist/bin.js:320:16)
    at getProjectSearchDir (/usr/local/lib/node_modules/ts-node/dist/bin.js:290:35)
    at main (/usr/local/lib/node_modules/ts-node/dist/bin.js:192:27)
    at Object. (/usr/local/lib/node_modules/ts-node/dist/bin.js:350:5)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/imaginaryUncacheableRequireResolveScript'
    ]
    }
    $ node ./devtools/dev/setup-envs-dev.js
    /home/ubuntu/py/solana-candy-factory/devtools/dev/setup-envs-dev.js:20
    .trim()
    ^

TypeError: Cannot read property 'trim' of undefined
at /home/ubuntu/py/solana-candy-factory/devtools/dev/setup-envs-dev.js:20:9
at Array.forEach ()
at /home/ubuntu/py/solana-candy-factory/devtools/dev/setup-envs-dev.js:13:9
at FSReqCallback.oncomplete (fs.js:180:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The code has not been changed

wjl8 commented

You should clone and install this https://github.com/metaplex-foundation/metaplex/tree/92eb2fb7bcd524cab5a6ec51dd8049cf034477b3/js/packages/cli/src as per the guide in the readme.md

Thank you