After installing a fresh wp-scaffold project using the project command, included png images cause the build to break. If I delete the included .pngs in themes/{theme-name}/assets/images, the error goes away.
Steps to Reproduce
Install a fresh scaffold using the scripts command: npx 10up-toolkit project init --template=git@github.com:10up/wp-scaffold.git --name=starbucks --confirm=yes
Install NPM dependencies npm i
Run npm run build and observe input buffer errors.
Screenshots, screen recording, code snippet
Full output:
Initializing project at .
Cloning into '/Users/petersorensen/scaffold-test'...
Composer could not detect the root package (10up/starbucks) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 15 installs, 0 updates, 0 removals
0 [>---------------------------] 0 [->--------------------------]
- Installing composer/installers (v2.2.0): Extracting archive
- Installing squizlabs/php_codesniffer (3.9.0): Extracting archive
- Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
- Installing phpcsstandards/phpcsutils (1.0.10): Extracting archive
- Installing phpcompatibility/php-compatibility (dev-develop a8d6714): Extracting archive
- Installing phpcompatibility/phpcompatibility-paragonie (1.3.2): Extracting archive
- Installing phpcompatibility/phpcompatibility-wp (2.1.4): Extracting archive
- Installing phpcsstandards/phpcsextra (1.2.1): Extracting archive
- Installing wp-coding-standards/wpcs (3.0.1): Extracting archive
- Installing sirbrillig/phpcs-variable-analysis (v2.11.17): Extracting archive
- Installing automattic/vipwpcs (3.0.0): Extracting archive
- Installing 10up/phpcs-composer (3.0.0): Extracting archive
- Installing wpackagist-plugin/debug-bar (1.1.4): Extracting archive
- Installing wpackagist-plugin/debug-bar-slow-actions (0.8.4): Extracting archive
- Installing wpackagist-plugin/query-monitor (3.15.0): Extracting archive
0/12 [>---------------------------] 0%
12/12 [============================] 100%
Generating autoload files
6 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Composer could not detect the root package (10up/starbucks-plugin) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 1 install, 0 updates, 0 removals
- Installing haydenpierce/class-finder (0.4.3): Extracting archive
Generating autoload files
Composer could not detect the root package (10up/starbucks-theme) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 1 install, 0 updates, 0 removals
- Installing haydenpierce/class-finder (0.4.3): Extracting archive
Generating autoload files
Project initialized.
? Choose a CI type: GitLab
CI generated.
➜ scaffold-test npm i
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated stylelint-stylistic@0.4.5: This package has been deprecated in favor of @stylistic/stylelint-plugin
> starbucks@1.0.0 prepare
> TEN="$(pwd)"; UP="$(git rev-parse --show-toplevel)"; TENUP="${TEN#"$UP"}"; cd "$(git rev-parse --show-toplevel)"; husky install ."${TENUP}"/.husky
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
husky - git command not found, skipping install
added 1577 packages, and audited 1581 packages in 6s
356 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
➜ scaffold-test npm run build
> starbucks@1.0.0 build
> npm run build --workspaces --if-present
> starbucks-theme@1.0.0 build
> 10up-toolkit build
✖ Webpack
Compiled with some errors in 829.04ms
assets by status 46.9 KiB [cached] 24 assets
orphan modules 15.1 KiB (javascript) 4.87 KiB (runtime) [orphan] 41 modules
built modules 6.71 KiB (javascript) 4.83 KiB (css/mini-extract) [built]
cacheable modules 3.79 KiB (javascript) 4.83 KiB (css/mini-extract)
javascript modules 3.79 KiB
modules by path ./assets/js/admin/*.js 268 bytes 2 modules
+ 3 modules
modules by path ./assets/css/ 4.83 KiB
modules by path ./assets/css/frontend/*.css 2.14 KiB 2 modules
+ 3 modules
modules by path ./includes/ 2.91 KiB
./includes/block-editor-script.js + 3 modules 645 bytes [not cacheable] [built] [code generated]
./includes/blocks/example-block/index.js + 7 modules 2.28 KiB [not cacheable] [built] [code generated]
ERROR in Input buffer contains unsupported image format
ERROR in Input buffer contains unsupported image format
ERROR in Input buffer contains unsupported image format
webpack 5.92.0 compiled with 3 errors in 834 ms
npm error Lifecycle script `build` failed with error:
npm error Error: command failed
npm error in workspace: starbucks-theme@1.0.0
npm error at location: /Users/petersorensen/scaffold-test/themes/starbucks-theme
> starbucks-plugin@1.0.0 build
> 10up-toolkit build
✖ Webpack
Compiled with some errors in 535.16ms
assets by status 38.3 KiB [cached] 12 assets
Entrypoint admin = css/admin.css js/admin.js js/admin.asset.php
Entrypoint frontend = css/frontend.css js/frontend.js js/frontend.asset.php
Entrypoint shared = css/shared.css js/shared.js js/shared.asset.php
orphan modules 3.81 KiB (javascript) 2.92 KiB (runtime) [orphan] 20 modules
cacheable modules 218 bytes (javascript) 36 bytes (css/mini-extract)
javascript modules 218 bytes
./assets/js/admin/admin.js 69 bytes [built] [code generated]
./assets/js/frontend/frontend.js 78 bytes [built] [code generated]
./assets/js/shared/shared.js 71 bytes [built] [code generated]
modules by path ./assets/css/ 36 bytes
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./assets/css/admin/admin-style.css 0 bytes [built] [code generated]
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./assets/css/frontend/style.css 36 bytes [built] [code generated]
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./assets/css/shared/shared-style.css 0 bytes [built] [code generated]
ERROR in Input buffer contains unsupported image format
ERROR in Input buffer contains unsupported image format
ERROR in Input buffer contains unsupported image format
webpack 5.92.0 compiled with 3 errors in 540 ms
npm error Lifecycle script `build` failed with error:
npm error Error: command failed
npm error in workspace: starbucks-plugin@1.0.0
npm error at location: /Users/petersorensen/scaffold-test/mu-plugins/starbucks-plugin```
### Environment information
_No response_
### WordPress information
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Describe the bug
After installing a fresh
wp-scaffold
project using theproject
command, included png images cause the build to break. If I delete the included .pngs in themes/{theme-name}/assets/images, the error goes away.Steps to Reproduce
npx 10up-toolkit project init --template=git@github.com:10up/wp-scaffold.git --name=starbucks --confirm=yes
npm i
npm run build
and observe input buffer errors.Screenshots, screen recording, code snippet
Full output: