dilanx / craco

Create React App Configuration Override, an easy and comprehensible configuration layer for Create React App.
https://craco.js.org
Apache License 2.0
7.43k stars 499 forks source link

Configuration file name issue #473

Open Gu-Miao opened 1 year ago

Gu-Miao commented 1 year ago

What's happening I created a new project with CRA5 and I have a configuration file named cracorc.ts, which is in the shown list on Website. But when I run craco start, I got this:

PS E:\Projects\craco-antd-ts-redux> npm start

> start
> craco start

E:\Projects\craco-antd-ts-redux\node_modules\.pnpm\@craco+craco@7.0.0_u3gkuxlvcvnfil7skimcnzk2pq\node_modules\@craco\craco\dist\lib\config.js:113
                throw new Error('craco: Config file not found. check if file exists at root (craco.config.ts, craco.config.js, .cracorc.js, .cracorc.json, .cracorc.yaml, .cracorc)');
                      ^

Error: craco: Config file not found. check if file exists at root (craco.config.ts, craco.config.js, .cracorc.js, .cracorc.json, .cracorc.yaml, 
.cracorc)

The two lists are not same...

CRACO version 7.0.0

dilanx commented 1 year ago

Thanks for catching this. Neither list was correct. The correct file name is .cracorc.ts. I just updated the documentation so that's accurate now, and I'll update that error message soon.