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 :-
> 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
Views
Replies
Total Likes
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
... to
../ui.apps/src/main/content
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
@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!
Views
Replies
Total Likes
Views
Likes
Replies