Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockbase: child theme creation failed #5010

Closed
cskelton86 opened this issue Nov 10, 2021 · 4 comments
Closed

Blockbase: child theme creation failed #5010

cskelton86 opened this issue Nov 10, 2021 · 4 comments

Comments

@cskelton86
Copy link

Steps to replicate

As per the Blockbase instructions, I ran the following command:

christian@christians-imac blockbase % npm run create:child em-core-theme

Result

blockbase@1.4.1 create:child
node create-child.js "em-core-theme"

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142

added 395 packages, and audited 396 packages in 4s

15 packages are looking for funding
run npm fund for details

22 vulnerabilities (9 moderate, 13 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.

em-core-theme@0.0.1 build
npm run build:theme && npm run build:scss

em-core-theme@0.0.1 build:theme
node ../blockbase/build.js em-core-theme

node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module '/Users/christian/Local Sites/event-manual/app/public/wp-content/themes/blockbase/build.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
child theme creation failed: Error: Command failed: cd ../em-core-theme/ && npm install && npm run build

Expected

I expected the child theme to be built but instead, it looks like build.js is missing from Blockbase. Any ideas?

@MaggieCabrera
Copy link
Contributor

Yes, thanks for reporting this! We recently changed Blockbase because the build process is no longer needed to generate a theme.json on the child theme that inherits from the parent (see #4861) and that affected the create child script. We need to update it to no longer use the build.js file anymore.

@MaggieCabrera
Copy link
Contributor

Meanwhile, I suggest you try https://github.com/Automattic/create-blockbase-theme, a plugin we are working on for the same purpose. It's still In really early stages though! But it will work better than this script does at the moment.

@cskelton86
Copy link
Author

Perfect, thank you very much.

@MaggieCabrera
Copy link
Contributor

I'll keep this open to either fix the script or remove it entirely though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants