Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot deploy functions, rules or indexes Edited

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.jsonsh: 1: tslint: not foundnpm ERR! file shnpm ERR! code ELIFECYCLEnpm ERR! errno ENOENTnpm ERR! syscall spawnnpm ERR! functions@ lint: `tslint --project tsconfig.json`npm ERR! spawn ENOENTnpm 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.logError: functions predeploy error: Command terminated with non-zero exit code1✖ Deployment failed.

2 answers

1 accepted

1 vote
Answer accepted

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.

Good to see, and makes sense that the install failed previously.

Like Wayne Kaskie likes this

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?

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.

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

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...

752 views 12 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you