Hi!
I'm having a problem that is getting me crazy. I have a node project that use pnpm. Inside, near the package.json and at the root level there's a .npmrc file with a private registry defined. Well... running "pnpm install" the .npmrc file is ignored. I have to include a config set into the pipeline script to make everything work. Why the .npmrc file is ignored? Any clue on this?
This is the pipeline:
image: node:16.15
clone:
depth: full
definitions:
caches:
pnpm: $BITBUCKET_CLONE_DIR/.pnpm-store
pipelines:
pull-requests:
'**':
- step:
name: Build, test and SonarClound Analysis
caches:
- pnpm
script:
- curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
- pnpm install
- pnpm run build:main
- pnpm run test:main
Hello @Jorge Vázquez ,
Welcome to Atlassian Community!
From the behaviour you reported, it seems more to be an issue with the framework you are currently using (npm) and it's own configuration, rather than with Pipelines itself, as we are just providing the container environment for your build scripts commands to be executed. That said, if you clone the repository and run the build in your local machine for the same commit, you will likely reproduce the same behavior.
With that in mind, I would have the following suggestions:
ls -la
https://pnpm.io/npmrc#registry
The registry URL used is determined by the scope of the package (seescope
). If no scope is specified, the default registry is used, which is supplied by theregistry
config parameter
Hope that helps! Let me know if you have any question.
Thank you, @Jorge Vázquez !
Kind regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.