Howdy, I have spent hours today trying to get a local dev setup working from source using these docs:
Not getting anywhere and wondering if I’m using a bad Yarn version or if you can provide any other guidance?
- using nvm, have tried Node 16 and Node 18
- Yarn 3.6 with both versions of Node
- Mac OS Ventura, Intel not M1
https://ghost.org/docs/install/source/#prerequisitesdoesn’t work because Yarn 3 doesn’t have global installs. I tried to get around this with
npm install -g knex-migratorand same with
ember-cli. Is this reasonable workaround?
- Supported node versions for self-hosted installs of Ghost says that “Ghost’s current recommended Node version is Node v16 LTS.” but then in the table below, says 18.x (Node v18 Hydrogen LTS) Recommended… so which is recommended?
- back to
yarn setupnever successfully runs, more info below
With Node 16 or 18 and Yarn 3.6:
Desktop % npm install ghost-cli@latest -g Desktop % npm install -g ember-cli Desktop % npm install -g knex-migrator
then repo steps from Ghost Docs
Ghost % corepack enable # to get yarn Ghost % yarn setup Internal Error: ghost-monorepo@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
Hmm okay, let’s do what it says:
Ghost % yarn install ... ➤ YN0058: │ ember-power-datepicker@https://github.com/cibernox/ember-power-datepicker.git#commit=da580474a2c449b715444934ddb626b7c07f46a7: Packing the package failed (exit code 1, logs can be found here: /private/var/folders/z8/9mv15y0s3tvft80885n7jcqh0000gn/T/xfs-1ba6fa9e/pack.log) ➤ YN0000: └ Completed in 3m 55s ➤ YN0000: Failed with errors in 3m 55s
Maybe something weird with that commit/release of ember-power-datepicker… let’s delete yarn.lock and try again
Ghost % rm yarn.lock Ghost % yarn install ... ➤ YN0000: Done with warnings in 19m 47s
Woohoo! Ready to try setup again:
Ghost % yarn setup ... [2023-06-24 00:13:31] ERROR Cannot find module '/Desktop/Ghost/node_modules/@tryghost/post-revisions/build/index.js'. Please verify that the package.json has a valid "main" entry Error: Cannot find module '/Desktop/Ghost/node_modules/@tryghost/post-revisions/build/index.js'. Please verify that the package.json has a valid "main" entry at /Desktop/Ghost/node_modules/knex-migrator/lib/index.js:240:23 at tryPackage (node:internal/modules/cjs/loader:425:19) ...
Surely this is not how this process is supposed to go! Thanks in advance for any help.