Describe the bug
Can't build fresh project with yarn build
Did you try recovering your dependencies?
yes
❯ yarn --version
1.22.15
Which terms did you search for in User Guide?
Css Minimizer plugin
Error: Cannot find module 'normalize-url'
Environment
npx create-react-app --info
Environment Info:
current version of create-react-app: 5.0.0
running from C:\Users\kowalski\AppData\Local\Yarn\Data\global\node_modules\create-react-app
System:
OS: Windows 10 10.0.19043
CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
Binaries:
Node: 17.4.0 - C:\Files\nodejs17\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.3.1 - C:\Files\nodejs17\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.62)
Internet Explorer: 11.0.19041.1202
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
- yarn create react-app my-app2 --template typescript
- cd my-app2
- yarn build
Expected behavior
should get builded app
Actual behavior
❯ yarn build
yarn run v1.22.15
$ react-scripts build
Creating an optimized production build...
Failed to compile.
static/css/main.a6b5f62b.css from Css Minimizer plugin
Error: Cannot find module 'normalize-url'
Require stack:
- D:\aaaa\my-app2\node_modules\postcss-normalize-url\dist\index.js
- D:\aaaa\my-app2\node_modules\cssnano-preset-default\dist\index.js
- D:\aaaa\my-app2\node_modules\cssnano\dist\index.js
- D:\aaaa\my-app2\node_modules\css-minimizer-webpack-plugin\dist\minify.js
- D:\aaaa\my-app2\node_modules\jest-worker\build\workers\threadChild.js

Reproducible demo
my-app2-for-issue.zip
Describe the bug
Can't build fresh project with yarn build
Did you try recovering your dependencies?
yes
❯ yarn --version
1.22.15
Which terms did you search for in User Guide?
Css Minimizer plugin
Error: Cannot find module 'normalize-url'
Environment
npx create-react-app --info
Environment Info:
current version of create-react-app: 5.0.0
running from C:\Users\kowalski\AppData\Local\Yarn\Data\global\node_modules\create-react-app
System:
OS: Windows 10 10.0.19043
CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
Binaries:
Node: 17.4.0 - C:\Files\nodejs17\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.3.1 - C:\Files\nodejs17\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.62)
Internet Explorer: 11.0.19041.1202
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
Expected behavior
should get builded app
Actual behavior
❯ yarn build
yarn run v1.22.15
$ react-scripts build
Creating an optimized production build...
Failed to compile.
static/css/main.a6b5f62b.css from Css Minimizer plugin
Error: Cannot find module 'normalize-url'
Require stack:
Reproducible demo
my-app2-for-issue.zip