Nextjs example not working outside the example folder

I was trying IPFS with Nextjs using this example: js-ipfs-examples/examples/browser-nextjs at master · ipfs-examples/js-ipfs-examples · GitHub.

It works perfectly when I run yarn && yarn run dev inside the js-ipfs-examples folder, but when I try to separate the browser-nextjs folder and run the app with yarn && yarn run dev I get this error:

error - ./node_modules/libp2p-kad-dht/src/routing-table/index.js:6:0
Module not found: Can’t resolve ‘./generated-prefix-list.json’.

It’s the same code and I don’t know what could be happening. How do I solve this problem?