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
Did you tried removing node_ module before install ?
Nicolas
Node_modules is gitignored in the repo, so it shouldn't be there when it gets pulled. I have deleted the Node cache, to no effect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.