1

I am currently working on hosting a Next.js app for an NFT marketplace on IPFS using Fleek. I've followed the steps to install the Fleek CLI using npm i -g @fleekhq/cli, built the app with npm run build, and initialized Fleek using fleek site:init.

However, during the initialization process, I encountered the following prompt:

? Which team you wanna use? Please input the teamId. e012xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
...fetching list of sites for team: e0128b28-76e4-4df9-afd6-66c0cae45662
    Error: No api key found. Generate a Fleek Hosting api key in the Fleek app and make it available to the Fleek CLI
    by creating an environment variable named FLEEK_API_KEY with a value corresponding to the generated api key.

Here's what I've done to address this issue:

Installed Fleek CLI: I used the command npm i -g @fleekhq/cli to install the Fleek CLI globally.

Built the App: I successfully built the Next.js app using the command npm run build.

Set FLEEK_API_KEY: I've set the FLEEK_API_KEY environment variable in my .env file with the following content:

FLEEK_API_KEY=<MY_FLEEK_API_KEY>

Despite having the FLEEK_API_KEY environment variable properly set in my .env file, I'm still encountering the "No api key found" error during the initialization process. Is there something I might be missing or a step I need to take to ensure that the Fleek CLI recognizes the FLEEK_API_KEY from the .env file? Any assistance would be greatly appreciated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.