Ethereum Boilerplate Questions

I keep getting the same error

"Failed to compile.

./src/components/NFTTokenIds.jsx
Attempted import error: ‘useNFTTokenIds’ is not exported from ‘react-moralis’. "

I tried deleting node modules, then yarn then yarn start but it didnt work.


Also just noticed my jsonconfig.json is showing a ‘Problem’ in VSCode
"File ‘/home/juan/projects/ethereum-boilerplate/node_modules/agent-base/dist/src/index’ not found.
The file is in the program because:
Root file specified for compilation

Hi all,

I am new to this world and in need of community advice.

I am following the very helpful YouTube video on how to develop the boilerplate in VCS but am getting the following message at the point of Yarn Install:

“zsh: command not found: yarn”

Can someone please assist me with getting through this step.

Regards,

FlyBoy

Hi FlyBoy,

It seems you don’t have yarn installed in your local machine.

First install yarn globally in your machine then you can run yarn install command from your terminal.

Install yarn via npm:

npm install --global yarn

Also please check this documentation if you need more info.

Hope you will fix this :wink:

Cheers!

1 Like

i tried to follow the same method on the DEX component to add avalanche to the tab-list. bit it isnt showing the tokens to exchange. Am i missing anything ?

Hey @johnsweeney85

Make sure you updated the react-morals version :muscle:

Hey @talk2coded

Since we use the 1inch plugin for the dex it doesn’t support avalanche

which other chains does it support? and how can avalanche be added ?

I’ve sent you a link above https://moralis.io/plugins/1inch/

Available chains This plugins works with 3 different blockchains (chain):

  • Ethereum (“eth”)
  • Binance Smart Chain (“bsc”)
  • Polygon (“polygon”)

This plugin doesn’t support it. The only way is to build it from scratch

Hi aakarkun,

Thank you kindly for your reply.

I have downloaded and run node.js on my macbook. I have then done the npm install --global yarn.

I received the following messages:

Would you be able to guide me through this issue?

Regards,

FlyBoy

Have you tried to run cmd as admin?

1 Like

As I know you need to use sudo when you are on Mac

1 Like

Hi @Yomoo
i am still struggeling with this issue. Did you find a solution on this? I cloned the actual repo from scratch changed nothing than my server data and deployed it here: https://kryrcj5kluck.usemoralis.com/ so you can still see the effect when hitting the refresh button for the side. Again on local server everything works fine.

Hi FlyBoy, did you fix it?

I think, @Yomoo’s answer should fix your problem.
It’s a permission issue, on Mac use sudo before npm install yarn --global.

command: sudo npm install yarn --global

Oh, it’s something related to the router-dom. Should be easy to fix

1 Like

Perfect. Thank you. :grinning: :+1:

I keep getting all these errors when running the dApp – it was working fine 3 weeks ago –last time I was working on it – the server went to sleep, I woke it up again.

Now I can’t even connect to metamask anymore.
Any hints would be much appreciated :slight_smile:

1 Like

Hey @joaoalvesmarrucho

Have you checked if your server is alive now? Looks like it sleeps. Check the appId and serverUrl again

I can’t even find logs from your server

Yes I think it is. It’s the polygon testnet one at the bottom