nft-minter-tutorial
nft-minter-tutorial copied to clipboard
Error running the minter
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?
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:
I have the same issue. how to fix it?
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.
The problem was related to the .env file. I tried to manually insert the Keys (Pinata, Alchemy) directly into the code and it works.