Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .npmrc file in bit playground #8571

Closed
andreeatirgovatu opened this issue Feb 25, 2024 · 4 comments
Closed

Add .npmrc file in bit playground #8571

andreeatirgovatu opened this issue Feb 25, 2024 · 4 comments

Comments

@andreeatirgovatu
Copy link

andreeatirgovatu commented Feb 25, 2024

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

@itaymendel
Copy link
Contributor

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

@andreeatirgovatu
Copy link
Author

andreeatirgovatu commented Feb 25, 2024

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"

@itaymendel
Copy link
Contributor

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.

@andreeatirgovatu
Copy link
Author

Thank you so much for your answers @itaymendel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants