nft-minter-tutorial icon indicating copy to clipboard operation
nft-minter-tutorial copied to clipboard

Error running the minter

Open famictech2000 opened this issue 3 years ago • 4 comments

After running the npm install and then npm start; im getting the following error: Error: Alchemy URL protocol must be one of http, https, ws, or wss. Recieved: undefined

How do I resolve?

famictech2000 avatar Jan 05 '22 23:01 famictech2000

Same here (using node v16.13.2 on macos 10.15.7 Catalina)

This is what npm start returns (in the nft-minter folder):


src/Minter.js
  Line 16:13:  Effect callbacks are synchronous to prevent race conditions. Put the async function inside:

useEffect(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching  react-hooks/exhaustive-deps
  Line 41:11:  Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener                                                                                                                                                                                                                                                                    react/jsx-no-target-blank

src/util/interact.js
  Line 34:13:   Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener  react/jsx-no-target-blank
  Line 76:13:   Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener  react/jsx-no-target-blank
  Line 87:16:   'loadContract' is defined but never used                                                                                                     no-unused-vars
  Line 92:18:   Expected '===' and instead saw '=='                                                                                                          eqeqeq
  Line 92:39:   Expected '===' and instead saw '=='                                                                                                          eqeqeq
  Line 92:67:   Expected '===' and instead saw '=='                                                                                                          eqeqeq
  Line 100:20:  The object literal notation {} is preferrable                                                                                                no-new-object

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

And this is what loading http://localhost:3000 returns:

Schermata 2022-01-19 alle 17 51 35

GAG94 avatar Jan 19 '22 16:01 GAG94

I have the same issue. how to fix it?

david-speakslow avatar Jan 22 '22 16:01 david-speakslow

I have the same issue. how to fix it?

In the end, I just tried the same thing the day after and it worked all well.

GAG94 avatar Jan 23 '22 13:01 GAG94

The problem was related to the .env file. I tried to manually insert the Keys (Pinata, Alchemy) directly into the code and it works.

david-speakslow avatar Jan 23 '22 13:01 david-speakslow