Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Problems bootstrapping a React SPA app from aem-spa-project-archetype

adamhoc
Level 1
Level 1

When running an unmodified React SPA project I'm seeing two xhr calls being made to:

http://localhost:4502/content/demo/en.model.json

http://localhost:4502/.model.json

The first call to en.model.json returns successfully but then the second call is failing.

Why is the second call to ".model.json" being made? That URL looks wrong. How do I fix this?

Steps to reproduce

AEM Version: 6.5

I was able to start a React SPA project using the aem-spa-project-archetype.

  1. `mvn clean install -PautoInstallPackage -Padobe-public`
  2. Follow instructions to update CORS config in AEM. aem-spa-project-archetype/DEVELOPMENT.md at development · adobe/aem-spa-project-archetype · GitHub
  3. run `npm start` in the react-app directory.
  4. View network call in your browser while accessing localhost:3000
2 Replies
estelito_reyes
Level 1
Level 1

Accessing localhost:3000 will throw this error because it's trying to retrieve the root path.

Try accessing your specific home.html page http://localhost:3000/content/demo/en/home.html

adamhoc
Level 1
Level 1

Thanks Estelito!

I'd mark your answer as correct but I can't find the button.