Error in manifest.yml File for Forge App Deployment

黒川悠馬
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2024

Hello Atlassian Community,

I am currently developing a Forge app for Confluence, but I am encountering issues with the `manifest.yml` file configuration. When I run the `forge deploy` command, I receive the following error:

` Error: The deploy failed due to errors in the app code. Fix the errors before rerunning forge deploy, or run forge deploy --no-verify to skip the linter. /path/to/manifest.yml 1:0 error document should NOT have additional property 'functions' valid-document-required X 1 issue (1 error, 0 warnings) Issue found is not automatically fixable with forge lint. Rerunning the command with --verbose may give more details `

Here is the content of my `manifest.yml` file:

 

`

modules: confluence:macro: - key: custom-search-page function: main title: Custom Search Page description: A page to test search functionality resources: - key: static path: static function: - key: main handler: index.run app: id: ari:cloud:ecosystem::app/c395a207-a9e6-4c09-a4f4-c3e76906de1b runtime: name: nodejs18.x permissions: scopes: - read:confluence-content.summary - search:confluence

`

I have tried various indentations and configurations, but none seem to resolve the issue.

For reference, here is the manifest.yml file of another app called printapp, which works perfectly. printapp is a basic app that takes a string input in a text box and prints it directly:

`

modules: confluence:macro: - key: searchtest-hello-world-macro function: resolver title: searchtest description: Custom Search Page for testing resources: - key: main path: static function: - key: resolver handler: index.handler app: runtime: name: nodejs18.x id: ari:cloud:ecosystem::app/c395a207-a9e6-4c09-a4f4-c3e76906de1b permissions: scopes: - read:confluence-content.summary - search:confluence
`


Development Environment

  • OS: macOS
  • Node.js Version: 22.3
  • Forge CLI Version:10.0.0

 

Attempts to Fix

  • I tried removing the function property, but encountered similar errors.
  • I also tried using the functions property but the issue persisted.
  • I experimented with different indentation styles without success.

 

I am a beginner in developing Forge apps, so please forgive any mistakes or lack of clarity in my question. I would greatly appreciate any guidance on what might be causing this issue and how to fix it. Thank you in advance for your help!

Best regards,
Yuma

1 answer

1 vote
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 26, 2024

I would expect it to look more like this

modules:
confluence:macro:
- key: custom-search-page
function: main
title: Custom Search Page
description: A page to test search functionality
resources:
- key: static
path: static
function:
- key: main
handler: index.run
app:
id: ari:cloud:ecosystem::app/c395a207-a9e6-4c09-a4f4-c3e76906de1b
runtime:
name: nodejs18.x
permissions:
scopes:
- read:confluence-content.summary
- search:confluence

The primary reason why the first YAML file works and the other does not is the placement and indentation of the function key. In File 1, the function key is not correctly placed under modules, making the structure invalid. In File 2, the function key is correctly nested under modules, which ensures proper structure and parsing.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events