10up-toolkit
10up-toolkit copied to clipboard
Issues on new scaffold
Describe the bug
When using npx 10up-toolkit project init as suggested on the README, if you install dependencies and just try to build (no changes), you get the following error on both the plugin and the theme:
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.97.0 compiled with 3 errors in 490 ms
npm error Lifecycle script `build` failed with error:
npm error code 1
npm error path /Users/alaguna/Projects/acretest/mu-plugins/acre-plugin
npm error workspace [email protected]
npm error location /Users/alaguna/Projects/acretest/mu-plugins/acre-plugin
npm error command failed
npm error command sh -c 10up-toolkit build
Additionally, admin-style is tried to be load but it's not generated and there's another error related to editor-style-overrides.
See below:
Steps to Reproduce
- Create a project with
npx 10up-toolkit project init - Try to build
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
CC: @tlovett1
I'm not able to even install with npx 10up-toolkit project init, as I get dependency resolution errors. I'm happy to open a separate issue though, as it seems initial reporter was able to get things installed and not able to run build.
Expand for full npm error log output
❯ npx 10up-toolkit project init
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: @typescript-eslint/[email protected]
npm error node_modules/@typescript-eslint/eslint-plugin
npm error @typescript-eslint/eslint-plugin@"^6.17.0" from [email protected]
npm error node_modules/10up-toolkit
npm error 10up-toolkit@"6.4.1" from the root project
npm error @typescript-eslint/eslint-plugin@"^6.4.1" from @wordpress/[email protected]
npm error node_modules/@wordpress/eslint-plugin
npm error @wordpress/eslint-plugin@"^17.5.0" from [email protected]
npm error node_modules/10up-toolkit
npm error 10up-toolkit@"6.4.1" from the root project
npm error peerOptional @wordpress/eslint-plugin@"^17.5.0" from @10up/[email protected]
npm error node_modules/@10up/eslint-config
npm error peer @10up/eslint-config@">=4.1.1" from [email protected]
npm error node_modules/10up-toolkit
npm error 10up-toolkit@"6.4.1" from the root project
npm error 1 more (eslint-plugin-jest)
npm error
npm error Could not resolve dependency:
npm error peerOptional @typescript-eslint/eslint-plugin@"^8.0.0" from [email protected]
npm error node_modules/eslint-plugin-jest
npm error peer eslint-plugin-jest@">=27.6.1" from @10up/[email protected]
npm error node_modules/@10up/eslint-config
npm error peer @10up/eslint-config@">=4.1.1" from [email protected]
npm error node_modules/10up-toolkit
npm error 10up-toolkit@"6.4.1" from the root project
npm error peerOptional eslint-plugin-jest@">=25" from [email protected]
npm error node_modules/eslint-plugin-playwright
npm error eslint-plugin-playwright@"^0.15.3" from @wordpress/[email protected]
npm error node_modules/@wordpress/eslint-plugin
npm error @wordpress/eslint-plugin@"^17.5.0" from [email protected]
npm error node_modules/10up-toolkit
npm error 1 more (@10up/eslint-config)
npm error
npm error Conflicting peer dependency: @typescript-eslint/[email protected]
npm error node_modules/@typescript-eslint/eslint-plugin
npm error peerOptional @typescript-eslint/eslint-plugin@"^8.0.0" from [email protected]
npm error node_modules/eslint-plugin-jest
npm error peer eslint-plugin-jest@">=27.6.1" from @10up/[email protected]
npm error node_modules/@10up/eslint-config
npm error peer @10up/eslint-config@">=4.1.1" from [email protected]
npm error node_modules/10up-toolkit
npm error 10up-toolkit@"6.4.1" from the root project
npm error peerOptional eslint-plugin-jest@">=25" from [email protected]
npm error node_modules/eslint-plugin-playwright
npm error eslint-plugin-playwright@"^0.15.3" from @wordpress/[email protected]
npm error node_modules/@wordpress/eslint-plugin
npm error @wordpress/eslint-plugin@"^17.5.0" from [email protected]
npm error node_modules/10up-toolkit
npm error 1 more (@10up/eslint-config)
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
@nicholasio wasn't this resolved with the last release?
The input buffer error is still happening however the issue described in https://github.com/10up/wp-scaffold/issues/290 has been fixed.
@nicholasio and @fabiankaegy I took some time to investigate. The issue happens because the images included aren't real images so they fail. Should I add a proper image (even if transparent) and/or add some notes around this?
@Antonio-Laguna for the other issues you've found I opened: https://github.com/10up/wp-scaffold/pull/293
I'd go ahead and add some actual images 👍
The image issue still persists. But I've fixed the other issues :)
It looks like the issue is that images get corrupted when scaffolding with init
Here's the fix: https://github.com/10up/10up-toolkit/pull/452