https://metaplay.io logo
Custom dashboard initialization (SDK v32.3)
# questions-and-feedback
p
Hello, we're using Metaplay SDK 32.3 with the pre-built dashboard. It has been working so far okay, but we'd like to start building a custom dashboard now. When following these instructions (https://docs.metaplay.io/liveops-dashboard/developing-the-liveops-dashboard#getting-started), the automated initialization fails for some reason. This is the console output:
Copy code
>metaplay init dashboard

Metaplay CLI 1.8.0, interactive mode

Initialize Custom LiveOps Dashboard in Your Project
āœ“ Node.js detected: 22.22.0 [minimum: 22.14.0] [minor version is more recent; downgrade if you encounter any problems]
āœ“ pnpm detected:    10.28.1 [minimum: 10.6.2] [warning: minor version is more recent; downgrade if you encounter any problems]

ERROR: failed to run dashboard project installer: failed to apply replacements to file content package.json: no replacement provided for placeholder {{{PROJECT_NAME}}}
Would anyone be able to assist in this?
j
Hi, The Metaplay CLI indeed seems to not support that command being run on the older SDK version. I'll make an item to fix the support for older versions. One option to fix this is to update to a newer SDK version, I believe R34 and R35 work as expected with the CLI. In the meanwhile I believe you should be able to fix this by going to your MetaplaySDK/Installer/dashboard_template.json file and find and replace manually
{{{PROJECT_NAME}}}
with your project name in all lowercase without spaces. Then running the
metaplay init dashboard
command normally should produce the correct output. Let me know if that works for you!
p
Thanks, that did the trick! However, now that the initialization works, building the dasboard produces another error:
Copy code
>metaplay build dashboard
 
Metaplay CLI 1.8.0, interactive mode

Build LiveOps Dashboard Locally

Output directory: Backend/Dashboard/dist

[...]

Build dashboard...
> pnpm build

> game3-dashboard@1.0.0 build F:\Game3\Backend\Dashboard
> vue-tsc --build && vite build

playwright.config.ts:7:29 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type 'PlaywrightTestConfig' is not assignable to parameter of type 'PlaywrightTestConfig<unknown, unknown>'.
      Types of property 'updateSnapshots' are incompatible.
        Type '"none" | "all" | "missing" | "changed" | undefined' is not assignable to type '"none" | "all" | "missing" | undefined'.
          Type '"changed"' is not assignable to type '"none" | "all" | "missing" | undefined'.

7 export default defineConfig(defaultConfig)
                              ~~~~~~~~~~~~~

  ../../node_modules/.pnpm/playwright@1.49.0/node_modules/playwright/types/test.d.ts:7473:17
    7473 export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>, ...configs: PlaywrightTestConfig[]): PlaywrightTestConfig<T, W>;
                         ~~~~~~~~~~~~
    The last overload is declared here.

Failed to build the LiveOps Dashboard: binary exited with error: exit status 1
If this is also related to the old SDK version, then no need to dig deeper. The custom dashboard for the moment is more nice-to-have than a requirement. We'll eventually update the Metaplay SDK version to the latest one.
j
Hmm, that I can't immediately reproduce on either new or old SDK. But my guess is this is an artifact of building many times. Usually in these cases it helps to clean out all node_modules folders in the project. Our migration guide for updating the SDK always includes this step so there's a few handy commands for cleaning them out in the "Clear and Recreate the Dashboard Dependencies" part in https://docs.metaplay.io/miscellaneous/sdk-updates/release-notes/release-35#for-games-with-customized-liveops-dashboard
p
Okay thanks, we might take a look into that!
2 Views