Yarn dev failed!

I am trying to run the Ghost Core on my Macbook M1 with the following components:

  • NodeJS LTS/Hydrogen (v18.19.1
  • Yarn (1.22.22)

I was able to run the yarn setup successfully, tables are migrated and records are populated. However when it comes to yarn dev then the following issues happened.

I have tried yarn fix but it doesn’t help.

yarn dev --verbose
yarn run v1.22.22
$ node .github/scripts/dev.js --verbose
Running projects: ghost, ts, admin, adminXDeps, adminX
[adminX]
[adminX]  >  NX   Running target dev for 2 projects and 2 tasks they depend on:
[adminX]
[adminX]     - @tryghost/admin-x-demo
[adminX]     - @tryghost/admin-x-settings
[adminX]
[adminX]
[admin]
[admin] > nx run ghost-admin:dev --live-reload-base-url=/ghost/ --live-reload-port=4201
[admin]
[ghost]
[ghost]  >  NX   Running target dev for project ghost and 12 tasks it depends on:
[ghost]
[ghost]
[adminX]
[adminX] > nx run @tryghost/admin-x-design-system:build  [local cache]
[adminX]
[adminX]
[adminX] > @tryghost/admin-x-design-system@0.0.0 build
[adminX] > concurrently "vite build" "tsc -p tsconfig.declaration.json"
[adminX]
[adminX] [0] vite build exited with code 0
[adminX] [1] tsc -p tsconfig.declaration.json exited with code 0
[ghost]
[ghost] > nx run ghost:dev
[ghost]
[admin] > ghost-admin@5.81.0 dev
[admin] > ember serve --live-reload-base-url=/ghost/ --live-reload-port=4201
[ghost] > ghost@5.81.0 dev
[ghost] > node --watch index.js
[ghost] (node:38380) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
[ghost] (Use `node --trace-warnings ...` to show where the warning was created)
[ghost] [2024-03-26 16:18:35] INFO Ghost is running in development...
[ghost] [2024-03-26 16:18:35] INFO Listening on: 127.0.0.1:2368
[ghost] [2024-03-26 16:18:35] INFO Url configured as: http://localhost:2368/
[ghost] [2024-03-26 16:18:35] INFO Ctrl+C to shut down
[ghost] [2024-03-26 16:18:35] INFO Ghost server started in 0.675s
[ghost] [2024-03-26 16:18:35] INFO Database is in a ready state.
[ghost] [2024-03-26 16:18:35] INFO Ghost database ready in 0.901s
[ghost] [2024-03-26 16:18:36] WARN Missing mail.from config, falling back to a generated email address. Please update your config file and set a valid from address
[adminX]
[adminX] > nx run @tryghost/admin-x-framework:build
[adminX]
[adminX]
[adminX] > @tryghost/admin-x-framework@0.0.0 build
[adminX] > concurrently "vite build" "tsc -p tsconfig.declaration.json"
[adminX]
[adminX] [0] vite build exited with code 0
[adminX] [1] src/vite.ts(37,13): error TS2769: No overload matches this call.
[adminX] [1]   The last overload gave the following error.
[adminX] [1]     Type 'Plugin_2' is not assignable to type 'PluginOption'.
[adminX] [1]       Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").Plugin' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").Plugin'.
[adminX] [1]         Types of property 'apply' are incompatible.
[adminX] [1]           Type '"build" | "serve" | ((this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined' is not assignable to type '"build" | "serve" | ((this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined'.
[adminX] [1]             Type '(this: void, config: UserConfig, env: ConfigEnv) => boolean' is not assignable to type '"build" | "serve" | ((this: void, config: UserConfig, env: ConfigEnv) => boolean) | undefined'.
[adminX] [1]               Type '(this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").ConfigEnv) => boolean' is not assignable to type '(this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").ConfigEnv) => boolean'.
[adminX] [1]                 Types of parameters 'config' and 'config' are incompatible.
[adminX] [1]                   Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig'.
[adminX] [1]                     Types of property 'plugins' are incompatible.
[adminX] [1]                       Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption[] | undefined' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption[] | undefined'.
[adminX] [1]                         Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption[]' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption[]'.
[adminX] [1]                           Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption'.
[adminX] [1]                             Type 'Plugin_2' is not assignable to type 'PluginOption'.
[adminX] [1]                               Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").Plugin' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").Plugin'.
[adminX] [1]                                 Types of property 'apply' are incompatible.
[adminX] [1]                                   Type '"build" | "serve" | ((this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined' is not assignable to type '"build" | "serve" | ((this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined'.
[adminX] [1]                                     Type '(this: void, config: UserConfig, env: ConfigEnv) => boolean' is not assignable to type '"build" | "serve" | ((this: void, config: UserConfig, env: ConfigEnv) => boolean) | undefined'.
[adminX] [1]                                       Type '(this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").ConfigEnv) => boolean' is not assignable to type '(this: void, config: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig, env: import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").ConfigEnv) => boolean'.
[adminX] [1]                                         Types of parameters 'config' and 'config' are incompatible.
[adminX] [1]                                           Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").UserConfig' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").UserConfig'.
[adminX] [1]                                             Types of property 'plugins' are incompatible.
[adminX] [1]                                               Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption[] | undefined' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption[] | undefined'.
[adminX] [1]                                                 Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption[]' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption[]'.
[adminX] [1]                                                   Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption'.
[adminX] [1]                                                     Type 'PluginOption[]' is not assignable to type 'PluginOption'.
[adminX] [1]                                                       Type 'PluginOption[]' is not assignable to type 'PluginOption'.
[adminX] [1]                                                         Type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vite/dist/node/index").PluginOption' is not assignable to type 'import("/Users/themrb/Documents/personal/draphonix/Ghost/node_modules/vitest/node_modules/vite/dist/node/index").PluginOption'.
[adminX] [1]                                                           Type 'Plugin_2[]' is not assignable to type 'PluginOption'.
[adminX] [1]                                                             Type 'Plugin_2[]' is not assignable to type 'PluginOption[]'.
[1]                                                               Type 'Plugin_2' is not assignable to type 'PluginOptionx run-many --projects=@tryghost/admin-x-demo,@tryghost/admin-x-settings --parallel=49 --targets=dev exited with code 1
--> Sending SIGTERM to other processes..
[adminXDeps] while [ 1 ]; do nx watch --projects=apps/admin-x-design-system,apps/admin-x-framework -- nx run \$NX_PROJECT_NAME:build; done exited with code SIGTERM
--> Sending SIGTERM to other processes..
[ts] while [ 1 ]; do nx watch --projects=ghost/bookshelf-repository,ghost/collections,ghost/donations,ghost/email-addresses,ghost/ghost,ghost/in-memory-repository,ghost/mail-events,ghost/model-to-domain-event-interceptor,ghost/nql-filter-expansions,ghost/post-events,ghost/post-revisions,ghost/recommendations -- nx run \$NX_PROJECT_NAME:build:ts; done exited with code SIGTERM
--> Sending SIGTERM to other processes..
[admin]
[admin]
[admin]
[admin]  >  NX   Running target dev for project ghost-admin failed
[admin]
[admin]    Failed tasks:
[admin]
[admin]    - ghost-admin:dev
[admin]
[admin]    Hint: run the command with --verbose for more details.
[admin]
[admin] nx run ghost-admin:dev --live-reload-base-url=/ghost/ --live-reload-port=4201 exited with code 1
--> Sending SIGTERM to other processes..
[ghost]
[ghost]
[ghost]
[ghost]  >  NX   Running target dev for project ghost and 12 tasks it depends on failed
[ghost]
[ghost]    Failed tasks:
[ghost]
[ghost]    - ghost:dev
[ghost]
[ghost]    Hint: run the command with --verbose for more details.
[ghost]
[ghost] nx run ghost:dev exited with code 1

Executing dev command failed:

If you've recently done a `yarn main`, dependencies might be out of sync. Try running `yarn fix` to fix this.
If not, something else went wrong. Please report this to the Ghost team.

✨  Done in 3.85s.