Repeated Error on yarn run dev: Parse Config File Failed in .umirc.ts

* Describe the bug

I’m encountering a persistent issue when running yarn run dev in my NocoBase project. The following error is reported:

yarn run v1.22.22
$ nocobase dev
WAIT: TypeScript compiling…
starting server 13001
starting client 13000
VERSION: 1.2.35-alpha
VERSION: 1.2.35-alpha
fatal - Error: Parse config file failed: [C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\packages\core\app\client.umirc.ts]
at Config.getUserConfig (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules@umijs\core\dist\config\config.js:161:17)
at Config.getUserConfig (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules@umijs\core\dist\config\config.js:58:19)
at Config.getConfig (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules@umijs\core\dist\config\config.js:66:36)
at Service.resolveConfig (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules@umijs\core\dist\service\service.js:352:55)
at Service.run (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules@umijs\core\dist\service\service.js:276:42)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Service.run2 (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules\umi\dist\service\service.js:65:12)
at async C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules\umi\dist\cli\forkedDev.js:23:5 {
[cause]: Error: ENOTEMPTY: directory not empty, rmdir ‘?\C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\packages\core\app\client\src.plugins\packages’
at Object.rmdirSync (node:fs:1219:10)
at _rmdirSync (node:internal/fs/rimraf:260:21)
at rimrafSync (node:internal/fs/rimraf:193:7)
at node:internal/fs/rimraf:253:9
at Array.forEach ()
at _rmdirSync (node:internal/fs/rimraf:250:7)
at rimrafSync (node:internal/fs/rimraf:193:7)
at Object.rmdirSync (node:fs:1211:14)
at IndexGenerator.generatePluginContent (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\packages\core\devtools\umiConfig.js:159:10)
at IndexGenerator.generate (C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\packages\core\devtools\umiConfig.js:126:10) {
errno: -4051,
syscall: ‘rmdir’,
code: ‘ENOTEMPTY’,
path: ‘\?\C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\packages\core\app\client\src.plugins\packages’
}
}
fatal - A complete log of this run can be found in:
fatal - C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\node_modules.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on Issues · umijs/umi · GitHub
Gateway IPC Server running at C:\Users\hamil\Desktop\astrolabInternship\tracking_sys\trackingSys\storage\gateway.sock
Gateway HTTP Server running at http://0.0.0.0:13001/

I noticed that trackingSys\packages\core\app\client/src/.plugins

  • NocoBase version: * NocoBase version: 1.2.35-alpha
  • Database type and version: PostgreSQL
  • OS:Windows
  • Deployment Methods: Git
  • Docker image version: not using Docker
  • NodeJS version: “node”: “>=18”

Please run it as administrator:
1.yarn nocobase clean
2. remove node_modules
3. yarn install
4. yarn dev

Check if the problem is solved

1 Like

This solution does work sometimes, but the issue keeps coming back. I often need to repeat the process and sometimes even restart my computer to get it working. It’s becoming quite time-consuming. If you have any other suggestions or insights, I’d really appreciate it!

Thanks again for your help!