Did as much troubleshooting as reasonable (e.g., mocking pipeline locally in Docker, listing installed packages in pipeline, various config file placements, etc) but I could not get past this issue:
[vite]: Rollup failed to resolve import "core/style.css" from "/opt/atlassian/pipelines/agent/build/packages/ui/src/index.ts"
My monorepo was symlinking core from the packages/ directory that ui is in, and is the only issue that I can think of because isolating the ui package from the NPM workspaces setup made the build complete successfully in the pipeline. Any ideas?
Pipeline as follows:
image: node:22
pipelines:
tags:
"@org/ui-*":
- step:
name: Build
caches:
- node
script:
- cd packages/ui
- npm install
- npm run build // FAILS HERE
artifacts:
- packages/ui/dist/**
- step:
name: Publish
script:
- pipe: atlassian/npm-publish:1.1.0
variables:
NPM_TOKEN: $NPM_TOKEN
FOLDER: ./packages/ui
"@org/core-*":
- step:
name: Build
caches:
- node
script:
- cd packages/core
- npm install
- npm run build // DOESN'T FAIL (no local dependencies)
artifacts:
- packages/core/dist/**
- step:
name: Publish
script:
- pipe: atlassian/npm-publish:1.1.0
variables:
NPM_TOKEN: $NPM_TOKEN
FOLDER: ./packages/core