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?
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! 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.
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?
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
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