teambit / bit

A build system for development of composable software.

Home Page:https://bit.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add .npmrc file in bit playground

andreeatirgovatu opened this issue · comments

Description

Hi,
I tried to install a private npm package in a bit project with react. Locally, it worked because I added a .npmrc file on the project root, but when I tried to export the componets, I got 404 not found error for that private package in bit ripple CI because it is not in bit and it needs an auth token to install.
The error :
Screenshot 2024-02-25 at 10 25 12
Project structure:
Screenshot 2024-02-25 at 10 29 00

Is there a way to do it? I checked the documentation and I could not find something related.

Thank you,
Andreea

Specifications

  • Bit version:1.6.62
  • Node version: 20.9.0
  • npm / yarn version: 10.1.0
  • Platform:
  • Bit compiler (include version):
  • Bit tester (include version):

Context and additional information

hi, if you use private packages there are three options for you:

  1. Set up "remote registry" configuration for RippleCI (you can set this in your "organization settings" page).
  2. Build the components on your CI with the provided CI script packages (https://bit.dev/blog/integrating-bit-with-your-existing-ci-lq55w51k/)
  3. Build the components locally on your system before the export (by adding the --build flag, ie bit tag -m "my version" --build

After I tried to use bit tag -m "my version" --build , this command is trying to publish the components as public, but my components should be private. Is there a way to change it?

Also, after I tried to export the component I got:

unexpected network error has occurred.
server responded with: "scope "{scope}". error: error: merge error occurred when exporting the component(s) {scope}/envs/my-react-env, {scope}/sidebar to the remote scope.
to resolve this error, please re-import the above components.
if the component is up to date, run "bit status" to make sure it's not merge-pending"

the component can still be private, this is only related to building the component in an environment that has access to your private packages. the command will not mark the component as public. this is defined only in the scope settings.

as for the error you are getting, please run bit checkout head before you run bit tag.

Thank you so much for your answers @itaymendel !