You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I started testing out pipelines here will a full featured repo. The pipelines failed. Eventually, I troubleshot it down to discover that the issue is not with hosting, but the other features. The one I care most about is firebase functions.
The error is that ts-lint is missing. This makes me think that the problem has to do with "functions" not being at the root and the pipeline doesn't "understand" that. This repo, also has a front end so it's impractical to put functions at the root.
I run npm install, but this only works for the root project. I also added this to my pipeline:
`npm --prefix ./function install ./function
and that didn't seem to help either, as per here: https://stackoverflow.com/questions/13498403/npm-install-dependencies-for-a-package-in-a-different-folder
Anyone have and solve this problem?
Wayne
ERROR:
i deploying functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /opt/atlassian/pipelines/agent/build/functions
> tslint --project tsconfig.json
sh: 1: tslint: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! functions@ lint: `tslint --project tsconfig.json`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-10T14_12_48_386Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1
✖ Deployment failed.
After updating my question, I realized that what I attempted was correct. I just needed to spell the folder name correctly!
The command to add to the pipeline is:
npm --prefix ./functions install ./functions
note that I was missing the S. That fixes the tslint issue. Now, I have another one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the error reporting and especially the warning, it looks like that `npm install` has not been run.
As each pipeline step is running in a new container with only the git project checkout by default (your mileage may vary, options are available):
Check the life cycles of the tooling are complete in each pipeline step. E.g. when using `npm`, `npm install` is normally required.
At least it sounds reasonable to me that this could be the reason that the `tslint` utility is not available.
Just an educated guess: Are you using npm to manage tslint via the tslint package?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is my guess as well, however, I don't know how to remedy it. I can't be the only person using the firebase pipeline for functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guess so, but I'm pretty sure you're not the only person using npm :).
Unrelated to the install issue, I've seen that tslint is deprecated. When you have things up and running, might be something you'd like to look into.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.