Skip to content

Instantly share code, notes, and snippets.

@skorasaurus
Last active April 29, 2021 21:37
Show Gist options
  • Save skorasaurus/19bd108acde4b22e7b368a6e078852f5 to your computer and use it in GitHub Desktop.
Save skorasaurus/19bd108acde4b22e7b368a6e078852f5 to your computer and use it in GitHub Desktop.
npx @wordpress/create-block test-block-2
npx: installed 213 in 18.437s
Creating a new WordPress block in "test-block-2" folder.
Creating a "block.json" file.
Creating a "package.json" file.
Installing npm dependencies. It might take a couple of minutes...
Installing `@wordpress/scripts` package. It might take a couple of minutes...
Formatting JavaScript files.
Compiling block.
(node:1570) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 2: npm run build
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `wp-scripts build`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/myusername/.npm/_logs/2021-04-29T21_16_13_956Z-debug.log
> [email protected] build /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2
> wp-scripts build
Hash: 81947b2820cd01068ca7
Version: webpack 4.46.0
Time: 3497ms
Built at: 04/29/2021 5:16:13 PM
2 assets
Entrypoint index = style-index.js index.js
[0] external ["wp","element"] 42 bytes {0} [built]
[1] external ["wp","i18n"] 42 bytes {0} [built]
[2] external ["wp","blockEditor"] 42 bytes {0} [built]
[3] external ["wp","blocks"] 42 bytes {0} [built]
[4] ./src/style.scss 1.62 KiB {1} [built] [failed] [1 error]
[5] ./src/editor.scss 1.62 KiB {0} [built] [failed] [1 error]
[6] ./src/index.js + 2 modules 3.15 KiB {0} [built]
| ./src/index.js 975 bytes [built]
| ./src/edit.js 1.19 KiB [built]
| ./src/save.js 1000 bytes [built]
ERROR in ./src/style.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:145:15)
at new Processor (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:51:25)
at postcss (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/postcss.js:73:10)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:95:20)
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/lib/NormalModule.js:316:20
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:104:7)
@ ./src/index.js 15:0-22
ERROR in ./src/editor.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:145:15)
at new Processor (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:51:25)
at postcss (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/postcss.js:73:10)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:95:20)
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/lib/NormalModule.js:316:20
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:104:7)
@ ./src/edit.js 24:0-23
@ ./src/index.js
at makeError (/home/myusername/.npm/_npx/1570/lib/node_modules/@wordpress/create-block/node_modules/execa/lib/error.js:59:11)
at handlePromise (/home/myusername/.npm/_npx/1570/lib/node_modules/@wordpress/create-block/node_modules/execa/index.js:114:26)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (/home/myusername/.npm/_npx/1570/lib/node_modules/@wordpress/create-block/lib/init-wp-scripts.js:31:2)
at async module.exports (/home/myusername/.npm/_npx/1570/lib/node_modules/@wordpress/create-block/lib/scaffold.js:100:3)
at async Command.<anonymous> (/home/myusername/.npm/_npx/1570/lib/node_modules/@wordpress/create-block/lib/index.js:91:6)
(node:1570) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1570) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm run start
> [email protected] start /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2
> wp-scripts start
webpack is watching the files…
Live Reload listening on port 35729
Hash: 783849bd0072720f0e0d
Version: webpack 4.46.0
Time: 1014ms
Built at: 04/29/2021 5:17:50 PM
Asset Size Chunks Chunk Names
index.asset.php 165 bytes index [emitted] index
index.js 18.2 KiB index [emitted] index
index.js.map 11 KiB index [emitted] [dev] index
Entrypoint index = style-index.js style-index.js.map index.js index.js.map index.asset.php
[./src/edit.js] 1.19 KiB {index} [built]
[./src/editor.scss] 1.62 KiB {index} [built] [failed] [1 error]
[./src/index.js] 975 bytes {index} [built]
[./src/save.js] 1000 bytes {index} [built]
[./src/style.scss] 1.62 KiB {style-index} [built] [failed] [1 error]
[@wordpress/block-editor] external ["wp","blockEditor"] 42 bytes {index} [built]
[@wordpress/blocks] external ["wp","blocks"] 42 bytes {index} [built]
[@wordpress/element] external ["wp","element"] 42 bytes {index} [built]
[@wordpress/i18n] external ["wp","i18n"] 42 bytes {index} [built]
ERROR in ./src/style.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:145:15)
at new Processor (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:51:25)
at postcss (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/postcss.js:73:10)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:95:20)
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/lib/NormalModule.js:316:20
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:104:7)
@ ./src/index.js 15:0-22
ERROR in ./src/editor.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:145:15)
at new Processor (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/processor.js:51:25)
at postcss (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss/lib/postcss.js:73:10)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:95:20)
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/lib/NormalModule.js:316:20
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.loader (/home/myusername/vvv/www/wordpress-default/public_html/wp-content/plugins/test-block-2/node_modules/postcss-loader/dist/index.js:104:7)
@ ./src/edit.js 24:0-23
@ ./src/index.js
^C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment