Currently, with a fresh version of Spoke & Chain, the front-end build will fail.
nitro create craftcms/spoke-and-chain spokeandchain
nvm use
npm install
npm run build
…will give you something like “Loading PostCSS "postcss-normalize" plugin failed: Cannot find module 'sanitize.css/page.css'”
Apparently, postcss-normalize v9.x has a dependency on sanitize.css, with a version set to *, rather than any specific version. So, sanitize.css released a major version (removing page.css), which breaks the build of projects using postcss-normalize. This is still the case with postcss-normalize v10.x.
Possible fixes:
Add a specific version of sanitize.css directly to this project
Add sanitize.css (or another normalizing CSS file) directly to this project, and import all of it instead of using postcss-normalize at all
I’ve gone with the first option in this PR, but it seems like the second option might be easier to manage longer term (and probably wouldn’t add much extra CSS), based on this.
Description
Currently, with a fresh version of Spoke & Chain, the front-end build will fail.
…will give you something like “Loading PostCSS "postcss-normalize" plugin failed: Cannot find module 'sanitize.css/page.css'”
Apparently, postcss-normalize v9.x has a dependency on sanitize.css, with a version set to
*
, rather than any specific version. So, sanitize.css released a major version (removing page.css), which breaks the build of projects using postcss-normalize. This is still the case with postcss-normalize v10.x.Possible fixes:
sanitize.css
directly to this projectsanitize.css
(or another normalizing CSS file) directly to this project, and import all of it instead of using postcss-normalize at allI’ve gone with the first option in this PR, but it seems like the second option might be easier to manage longer term (and probably wouldn’t add much extra CSS), based on this.