尝试在Metaplex中运行生成的ART配置,并继续返回。我尝试改变一切
桌面%ts-node ./metaplex/js/packages/cli/src/candy-machine-v2-cli.ts generate_art_art_configuration特征 /USR/local/lib/node_modules/ts-node/src/index.ts:820 返回新的tserror(DiagnoStictext,诊断图); ^ tserror:⨯无法编译打字稿: metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:4:47-错误ts2307:找不到模块'Commander'或其相应的类型声明。
4导入{invalidargumentError,program}来自'commander'; ~~~~~~~~~~~ metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:5:25-错误ts2307:找不到模块'@project-serum/adnaingor'或其相应的类型声明。
5导入 *作为'@project-serum/锚定'的锚点; ~~~~~~~~~~~~~~~~~~~~~ metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:14:45-错误ts2307:找不到模块'@solana/web3.js'或其相应的类型声明。
14 Import {publicKey,lamports_per_sol}来自'@solana/web3.js'; ~~~~~~~~~~~~~~~ metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:41:17-错误ts2307:找不到模块“ loglevel”或其相应的类型声明。
41从“ loglevel”导入日志; ~~~~~~~~~~ metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:45:25-错误ts2307:找不到模块'mime'或其相应的类型声明。
45从'Mime'导入{getType}; ~~~~~~
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:820:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:824:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1014:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1322:43)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1454:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1458:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
诊断码:[2307,2307,2307,2307,2307]
desktop % ts-node ./metaplex/js/packages/cli/src/candy-machine-v2-cli.ts generate_art_configuration traits
/usr/local/lib/node_modules/ts-node/src/index.ts:820
return new TSError(diagnosticText, diagnosticCodes);
^
TSError: ⨯ Unable to compile TypeScript:
metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:4:47 - error TS2307: Cannot find module 'commander' or its corresponding type declarations.
4 import { InvalidArgumentError, program } from 'commander';
~~~~~~~~~~~
metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:5:25 - error TS2307: Cannot find module '@project-serum/anchor' or its corresponding type declarations.
5 import * as anchor from '@project-serum/anchor';
~~~~~~~~~~~~~~~~~~~~~~~
metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:14:45 - error TS2307: Cannot find module '@solana/web3.js' or its corresponding type declarations.
14 import { PublicKey, LAMPORTS_PER_SOL } from '@solana/web3.js';
~~~~~~~~~~~~~~~~~
metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:41:17 - error TS2307: Cannot find module 'loglevel' or its corresponding type declarations.
41 import log from 'loglevel';
~~~~~~~~~~
metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:45:25 - error TS2307: Cannot find module 'mime' or its corresponding type declarations.
45 import { getType } from 'mime';
~~~~~~
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:820:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:824:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1014:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1322:43)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1454:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1458:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
diagnosticCodes: [ 2307, 2307, 2307, 2307, 2307 ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看来您还没有纱线安装了JS文件夹。
但是几个月前,艺术一代已经从Metaplex仓库中删除。它是由Halaprix从较旧的存储库中保存和提取的,如果您想继续使用它,则可以在此处找到。
https://github.com/halaprix/simple-nft-generator
还使用当前使用最广泛的发电机的桥梁。
https://github.com/hashlips
It looks like you haven't yarn installed the JS folder.
But also a few months back the art generation was removed from the Metaplex repo. It was saved and extracted from an older repo by Halaprix and can be found here though if you wish to continue using it.
https://github.com/halaprix/simple-NFT-generator
Alternatively you could also use Hashlips which is the most widely used generator currently.
https://github.com/HashLips
在您的终端中写下CD“弃用clis的路径”,然后您需要使用=&gt安装依赖项; YARN安装
in your terminal write cd "the path of deprecated-clis" and then you need to install the dependencies with => yarn install
我已经在适当的文件夹中的“纱线安装”,所以这里的其他答案对我不起作用。
(注意:您可以直接在Metaplex/js文件夹[ cd Metaplex/js; Yarn install ]中或从主文件夹[ yarn install -install -cwd〜/metaplex/js/< /em>] ...我使用了前者)。
我意识到Windows中的一个类似BASH的工具(例如Cygwin)无法正确使用TS节点:
它似乎找不到已安装的模块,并且我得到了与OP相同的确切错误。可能是在类似Linux的Env中尝试访问Windows Filepath的原因。我也疲倦了完全和相对的路径:
但是这在窗户上起作用(我不确定相对路径是否有效,所以我只是使用完整的路径使我的生活更轻松)
I had already 'yarn install'-ed in the appropriate folder so other answer here didn't work for me.
(Note: you can do directly in metaplex/js folder [cd metaplex/js; yarn install] or run from the main folder [yarn install --cwd ~/metaplex/js/]... i used the former ).
I realized a bash-like tool in Windows (like cygwin) wasn't working with ts-node correctly:
It couldn't seem to find the modules that were installed and i got the same exact errors as the OP. It might be cause of Windows filepaths trying be accessed in a linux-like env. I tired full and relative paths as well like:
However this worked on Windows (I wasn't sure about if relative paths worked, so I just used the full paths to make life easier on me)