Hi Guys, I am completely stuck trying to make very tiny changes to the dawn theme and need help.
I have installed gulp, yarn and node. I have then gone to the blog CSS file and made the tiniest change to one of the headings. However, when trying to compile the changes I am failing to make them work.
Here are the instructions I have been following: Dawn/README.md at main · TryGhost/Dawn · GitHub
I change directory to: cd content/themes/Dawn-master
Then I type yarn
which runs successfully
However, when I run the next bit yarn dev
I get the below errors.
yarn run v1.22.5
warning dawn@1.0.0: The engine "ghost" appears to be invalid.
warning dawn@1.0.0: The engine "ghost-api" appears to be invalid.
$ gulp
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/joemacguffog/my_ghost/content/themes/Dawn-master/node_modules/beeper/index.js
require() of ES modules is not supported.
require() of /Users/joemacguffog/my_ghost/content/themes/Dawn-master/node_modules/beeper/index.js from /Users/joemacguffog/my_ghost/content/themes/Dawn-master/gulpfile.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/joemacguffog/my_ghost/content/themes/Dawn-master/node_modules/beeper/package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1080:13)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/joemacguffog/my_ghost/content/themes/Dawn-master/gulpfile.js:10:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
code: 'ERR_REQUIRE_ESM'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have tried following the instructions in the error, but have been trying for hours and have still failed to make any progress. Please help? :)
Required info:
-
Latest version of ghost
-
Running locally hosted on a mac
-
Not sure how you would reproduce other than trying to change the CSS of the dawn theme yourself