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
`
function
property, but encountered similar errors.functions
property but the issue persisted.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.