Node index.js problem

Hello . I did everything like in this video until 5:00 minutes

engine downloaded from this link:

that is :
in config.js I added
const baseImageUri = "my url server from moralies

in index.js I added

// Moralis creds
const serverUrl = my url server from moralies
const appId = my Application ID from moralies
const masterKey = my Master Key from moralies;
const apiUrl = https://deep-index.moralis.io/api/v2/ipfs/uploadFolder;
// xAPIKey available here: https://deep-index.moralis.io/api-docs/#/storage/uploadFolder
const apiKey = from >> this side https://deep-index.moralis.io/api/v2/ipfs/uploadFolder;

now I want to use the command : node index.js

and I get such an error

if he wants to use the command:

  • npm install
  • npm install --global yarn
  • yarn index.js

there is the same error as in the screenshot

Looks like you don’t have NodeJs installed. You can download it here. If you already installed it, you need to check if the path is set properly

Thanks qudusayo helped.

but unfortunately I have another problem.

after running the command

npm install and then node index.js

the engine only generated png images for me in the output folder with no metadata

such an error is in the terminal

And on the moralis page in my dashboard , there are no my mutants

Double check your server values in your code (serverUrl, appId, masterKey, etc.), the 401 error means unauthorized. You can compare your script with the final one.

hi, after a few tries it still doesn’t work, I still have the same error “401”

I think it’s a problem with this page : https://deep-index.moralis.io/api-docs/#/storage/uploadFolder

because when I look at the tutorial, he doesn’t have this error

I should in this window “Available authorizations”
the entries of your api key what I want or should it generate itself "?

because, for example, when I enter value: aaa and then accept. at the bottom is the key that I entered in value and when I copy it to index.js there is a 401 error like on this page.

You need to add your own Moralis API key in that Authorize window.

You can get your API key from this page on the Keys tab (Web3 Api Key).

And in your index.js script, you need to fill in all of the specific details for your Moralis server and account (serverUrl, appId, masterKey, API key) - all of these can be obtained from your Moralis admin panel.

1 Like