Gatsby deployment to Netlify failing using bit.dev remote server

All PostsPosts filtered by: so notes

Gatsby deployment to Netlify failing using bit.dev remote server

Updated: February 11, 2020 by Tony Alves

Original: on Stackoverflow

The culprit here is the use of a bit.dev component registry server for one of your dependencies.

"@bit/bondz.react-epic-spinners.atom-spinner": "^0.3.0",

Here is the doc section to start following to setup on Netlify:

On Netlify, you cannot generate the file dynamically, and you should add .npmrc file in your project.

Add .npmrc to the project

You can add a .npmrc in your project with the following:

/.npmrc

@bit:registry=https://node.bit.dev
//node.bit.dev/:_authToken=${BIT_TOKEN}
always-auth=true

Add the BIT_TOKEN as environment variable

DO NOT: replace the BIT_TOKEN variable with the actual token in the .npmrc file because it is public. Only put the token into the admin panel of Netlify explained in the linked docs.

© Tony Alves