Support Forums

Error when trying to deploy the example fauna todo app

I keep getting this error when trying to run “npm run boostrap” on my local (this also fails on a deploy attempt).

hoguej@Jons-MacBook-Air netlify-faunadb-example % npm run bootstrap

netlify-fauna@0.1.0 bootstrap
netlify dev:exec node ./scripts/bootstrap-fauna-database.js

› Error: Failed retrieving addons for site :
› Unauthorized. Double-check your login status with ‘netlify status’ or contact
› support with details of your error.

When I do “netlify status”, I get my current user name and site info with on errors. How can I resolve this issue?

Hi @Jonathan_Hogue,

I just tried the repo myself and it works fine here:

npm run bootstrap

> netlify-fauna@0.1.0 bootstrap
> netlify dev:exec node ./scripts/bootstrap-fauna-database.js

◈ Injected .env file env var: FAUNADB_SERVER_SECRET
Creating your FaunaDB Database...

Create the fauna database schema!
Fauna Database schema has been created
Claim your fauna database with "netlify addons:auth fauna"

This is what I did:

Cloned the repo → npm i → created .env file with the contents FAUNADB_SERVER_SECRET=valuenpm run bootstrap.

On a side note, I won’t recommend following along that example for a long run. It’s published over a year back and the dependencies are fairly old ones. A lot of stuff might have changed. But, as far as the npm run bootstrap thing is concerned, it works fine.