keycloakify: Windows: Error: ENOENT: no such file or directory, scandir 'C:\Wefabricate\Projects\keycloakify-starter\public\keycloak-resources\tmp_suLeKsxId_c5f68d7a\keycloak\account\resources'

I’m having trouble setting up the keycloak starter project. The error below shows up when running yarn. All I did was clone the project and try to start it.

Same error also shows up when running yarn build-keycloak-theme

yarn install v1.22.19
success Already up-to-date.
$ copy-keycloak-resources-to-public
node:fs:1527
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, scandir 'C:\Wefabricate\Projects\keycloakify-starter\public\keycloak-resources\tmp_suLeKsxId_c5f68d7a\keycloak\account\resources'
    at Object.readdirSync (node:fs:1527:3)
    at crawlRec (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\tools\crawl.js:43:35)
    at crawl (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\tools\crawl.js:65:5)
    at transformCodebase (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\tools\transformCodebase.js:52:50)
    at C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\keycloakify\generateTheme\downloadKeycloakStaticResources.js:107:63
    at step (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\keycloakify\generateTheme\downloadKeycloakStaticResources.js:56:23)
    at Object.next (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\keycloakify\generateTheme\downloadKeycloakStaticResources.js:37:53)
    at fulfilled (C:\Wefabricate\Projects\keycloakify-starter\node_modules\keycloakify\bin\keycloakify\generateTheme\downloadKeycloakStaticResources.js:28:58) {
  errno: -4058,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'C:\\Wefabricate\\Projects\\keycloakify-starter\\public\\keycloak-resources\\tmp_suLeKsxId_c5f68d7a\\keycloak\\account\\resources'
}

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 15

Most upvoted comments

Well it’s a workaround not a solution.
I’ll try to figure out what’s up with node 20.
Glad you have a workaround though

Try downgrading you node version to v18.17.0 in your WSL environement like @sorooshjaberi did, see if it solves the issue.

That works, thanks