Error while publishing DX component

Hi,

I am trying custom DX Component.

After creating the component i have run below steps:

npm run authenticate(which was successful)

npm run publish

After running this i am getting below error

[Error: ENOTEMPTY: directory not empty, rmdir ‘F:\node\abhiapp\dist\components\Abhijit_Extensions_ViewPDF1’] {
errno: -4051,
code: ‘ENOTEMPTY’,
syscall: ‘rmdir’,
path: ‘F:\node\abhiapp\dist\components\Abhijit_Extensions_ViewPDF1’
}

Node.js v22.11.0

Can someone please help me with this

Thanks

@AbhijitP16917831 Was able to resolve this after error changing the “Dev-build” option to “false” in the tasks.config.json file

Hello Abhijit, Greeting, Just curious to know, did you face this issue during publish after successful authentication.

“Error: Error: Error in authentication. Please regenerate using authenticate”

We also got same error as you but we fixed that by making dev-build as false. But getting this error , which not able to fix?

Any guidance would be appreciated.

Hi @ShivamG17006319 ,

No i didn’t got this issues and i was able to deploy after fixing this.
I would suggest to once regenerate oAuth2 token and try the new key to authenticate