We want to use Bitbucket Pipelines to test & deploy a project of ours. Two dependencies to the project are private Git repositories also on Bitbucket, formatted using the following notation in package.json:
"@namespace/repository": "bitbucket:[owner]\[repository].git#[commit-hash]"
The pipelines YML file, in a simplified form, contains the following data:
image: node:13.8.0
pipelines:
default:
- step:
caches:
- node
script:
- npm ci -dd
- find node_modules/@namespace/repository
The 'npm ci' command does succeed, but the namespace/repository's prepare script is seemingly not executed, as the 'find' script will only report the existance of the package.json and README.md file (and those are included by default).
The scripts that exist in this dependency repo:
"scripts": {
"analyze": "node ./scripts/analyze.js",
"start": "start-storybook -p 9009 -s public",
"build": "build-storybook -s public",
"build:lib": "node ./scripts/export-gen.js && webpack && node ./scripts/clean.js",
"prepare": "npm run build:lib"
}
}The 'prepare' script (and therefore 'build:lib') makes sure that the library is built and useable as a module. Executing the same 'npm run build:lib' on (post)install collides with missing dependencies.
What are we doing wrong?