Expand my Community achievements bar.

AEM sync is issue

Avatar

Level 1

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

6 Replies

Avatar

Level 8

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

Avatar

Level 1

Hello @Tethich 

Thanks but it's not working it gives below error.

[webpack-cli] Error: Unknown option '--env.writeToDisk'
[webpack-cli] Run 'webpack --help' to see available commands and options
'watch' is not recognized as an internal or external command,
operable program or batch file.
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

Avatar

Level 1

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. 

Avatar

Level 8

Can you try to manually run the aemsync directly ?

Tethich_0-1734118101776.png

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.

Avatar

Administrator

@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