Deployment failed

Hi - I have experienced this issue (or similar) a couple of times, even after starting up new App on Noumena Cloud. Deployment from Codespaces or Cursor widgets fail. Here error message from failed Cursor attempt.

Backend deployment failed: Deploy failed with status 422: {“code”:“UnprocessableEntity”,“message”:“UnprocessableEntity”,“trace”:“e9735c43-0d17-40f3-8d12-18386c324bda”}

What to do?

Which version of the NPL-dev for VS Code extension are you using? Version 1.3.6 and 1.3.7 had a bug that would cause the wrong folder to be uploaded. It was fixed in 1.3.8, but of course it would be best to use the latest version (1.3.10).

We’ve noticed some users are still using a previous folder structure, with the migration.yml file being placed in a now-unrecognised place. It might be your case too.

The migration file should be in the main folder, and not in a yaml folder anymore. See the folder structure below for the hello world.

└── src
    ├── main
    │   ├── migration.yml
    │   └── npl-1.0.0
    │       └── demo
    │           └── helloWorld.npl
    └── test
        └── npl
            └── demo
                └── test_hello_world.npl

Is this still up to date, in particular, the folder “npl-1.0.0” naming, after the engine release 2025.1.10?

Couple of solutions how to fix deployments to Noumena Cloud failing even if you have the latest migration.ymland file structure, e.g., after cloning the npl-init repository. Note they changed migration and file structure around with release 2025.1.10.

Make sure everything is up to date. This is what I did:

  1. Make sure your app on Noumena Cloud is running the latest version of the engine. If in doubt, create a new app. The latest Noumena engine will be loaded.

  2. If you use the command line to deploy, make sure you use the latest version of the NPL CLI. You can check this by entering npl version in the terminal. If you don’t have the latest go to a terminal and enter:
    brew update
    brew upgrade npl

  3. If you’re using an IDE like VSCode and are working with Dev Containers, your NPL CLI in the Dev Container might be outdated. Make sure to update it to the latest version by rebuilding the Dev Container. E.g., in VSCode, press Cmd+Shift+P on macOS and search and run “Dev Containers: Rebuild Without Cache and Reopen in Container”. You should now have the latest version.

  4. If you’re using an IDE like VSCode locally with Dev Containers and want to use the Noumena Cloud widget from the NPL Plugin, make sure (a) the NPL Plugin is up to date and (b) you have the right path set in the settings of the IDE. For (b) hit Cmd+, to go to the settings, search for @id:NPL.migrationDescriptorand update to the path of the Dev Containers, e.g., /workspaces/npl-init/api/src/main/migration.yml

This now depends on the migration.yml.

Here is the migration.yml from the npl-init repository and that is produced by the npl init command:

$schema: https://documentation.noumenadigital.com/schemas/migration-schema-v2.yml

changesets:
  - name: 1.0.0
    changes:
      - migrate:
          sources:
          - npl
          rules: rules/rules_1.0.0.yml

The sources points to the npl folder, in this case. This would then require the folder to be un-versioned.
If the path is required to be npl-1.0.0, the npl source need to be changed to npl-1.0.0. It will then match the one described above.