AEM sync is issue | Community
Skip to main content
December 13, 2024

AEM sync is issue

  • December 13, 2024
  • 2 replies
  • 1159 views

Hello all,

I am running "npm run develop" command inside ui.frontend but it's not working and not syncing with local instance.

inside package.json :-

"scripts": {
      "develop": "aemsync -w ../ui.apps/src && webpack serve --env clientlib --config ./webpack.dev.js"
 }
 

> aem-maven-archetype@1.0.0 develop
> aemsync -w ../ui.apps/src && webpack serve --env clientlib --config ./webpack.dev.js

aemsync version 5.0.5

Watch over: C:\Hitachi Energy\Develop\ui.apps\src
Targets: http://admin:admin@localhost:4502
Exclude: **/jcr_root/*
**/@(.git|.svn|.hg|target)
**/@(.git|.svn|.hg|target)/**
Delay: 300

 

stuck here please help.

 

Thanks,

Swarup

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Tethich
Community Advisor
Community Advisor
December 13, 2024

Hi @swarupyadav 

I am using this one, which is slightly different:

"develop": "webpack-dev-server --config ./webpack.dev.js --env.writeToDisk & watch 'clientlib' ./dist & aemsync -w ../ui.apps/src/main/content"

Few things to point out:
- You could use & instead of &&.

- I prefer to start aemsync at last

- Maybe you might not need to use watch mode for node

- I point aemsync ro

December 13, 2024

What I want to achieve is, when I save a file inside code editor, it should get automatically sync with AEM local instance and page should get refreshed. 

Tethich
Community Advisor
Community Advisor
December 13, 2024

Can you try to manually run the aemsync directly ?

Then manually change any file that you expect to get synced and check the console to see if you get any message about that file being synced.

kautuk_sahni
Community Manager
Community Manager
December 16, 2024

@swarupyadav Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni