mattdeco/nft-vending-machine

stderr Error: No such file or directory (os error 2) Directory Issues

Closed this issue · 4 comments

Having Issues getting it to work with my asset directory -
Error: No such file or directory (os error 2)

at ChildProcess.exithandler (child_process.js:383:12)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.emit (domain.js:475:12)
at maybeClose (internal/child_process.js:1058:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:400:28)
at Socket.emit (domain.js:475:12)
at Pipe.<anonymous> (net.js:686:12) {

killed: false,
code: 1,
signal: null,

what is the best way to find the directory path to input into my .env for ex mine is
NFT_COLLECTION_PATH=/nft-vending-machine-main/assets/losangeles-hacker-house

Fixed the above error by just moving the repo to my desktop- but now getting this error
stderr Error: RPC response error -32002: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit.
Must be an issue with the RPC

NFT_COLLECTION_PATH should be the fully qualified path to the directory where your assets are stored, if you're on Windows I believe you'd need to start with the drive letter ex C:\nft-vending-machine-main\assets\losangeles-hacker-house\. Apologies, I wrote this in a hurry and only tested on macOS.

As for the 2nd error, that sounds like an issue with using an account that has no funds available, but I haven't seen that particular message before. You might want to try this out on Devnet where you can airdrop some SOL to pay for transactions, minting, and so forth without having to use real SOL on Mainnet.

Hope that helps!

Thanks for the suggestion! I will try devent first. Quick ? @mattdeco do I need to deploy my assets to candy-machine before I try this out or can my assets just get deployed right from the nft-vending-machine? The json file you use in your demo already as assets deployed to arweave it seems with the URI -

@walter-grace The intention is that both the NFT images and off-chain JSON metadata are deployed ahead of time to arweave or another hosting solution. The vending machine reads the -nft.json files to get the on-chain JSON metadata for a given NFT, then mints it and sends it to the customer's wallet address.

Also, the vending machine creates standard master edition Solana NFTs -- they don't come out of a candy machine and thus don't have the properties of an NFT that did (such as having the candy machine program as a mint authority).