I have got an error when I tried to deploy my app. The “hello world” app works fine. But when I added my app logic, it cannot be deployed. The error is like this:
pengxiao@pengs-air mdx-confluence % forge deploy
Deploying your app to the development environment.
Press Ctrl+C to cancel.
Running forge lint...
No issues found.
✕ Deploying mdx-confluence to development...
ℹ Packaging app files
ℹ Uploading app
ℹ Validating manifest
ℹ Snapshotting functions
Error: Error thrown in the snapshot context.
App code snapshot error: Snapshot error occurred: Error: Code generation from strings disallowed for this context
Learn more about the snapshot context at http://go.atlassian.com/forge-snapshot-context.
Rerunning the command with --verbose may give more details.
If I understand it correctly, this is related to “eval()”, which might be the case given the function that I am trying. Is the a configuration that can ignore this warning? I have already tried “permissions:content:unsafe-eval”.
After enabled “–verbose”, it printed this following error:
Hi @mventnor , I am build an application on top of mdx (https://mdxjs.com/). It won’t surprise me if mdx needs to eval the embedded JavaScript.
MDX is an authorable format that lets you seamlessly write JSX in your Markdown documents. You can import components, such as interactive charts or alerts, and embed them within your content. This makes writing long-form content with components a blast .