primer / css

The CSS design system that powers GitHub
https://primer.style/css
MIT License
12.52k stars 1.2k forks source link

Docs stopped working #1632

Closed simurai closed 2 years ago

simurai commented 2 years ago

When running yarn start locally I get this error:

 ERROR #98123  WEBPACK

Generating development SSR bundle failed

Must use import to load ES Module: /Users/simurai/local/primer/css/postcss.config.js
require() of ES modules is not supported.
require() of /Users/simurai/local/primer/css/postcss.config.js from
/Users/simurai/local/primer/css/docs/node_modules/cosmiconfig/dist/loaders.js is an ES module file as it is a .js file whose nearest parent
package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename postcss.config.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from
/Users/simurai/local/primer/css/package.json.

File: ../src/docs.scss

not finished Building development bundle - 8.562s

error Command failed with exit code 1.

Could it be related to https://github.com/primer/css/pull/1528? Or https://github.com/primer/css/pull/1617?

Maybe that's why deploying the docs in PRs like https://github.com/primer/css/pull/1600 stopped working as well:

Screen Shot 2021-10-01 at 20 57 53
jonrohan commented 2 years ago

Fixed