Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix relative paths to react (at least in admin) #123

Open
npeltier opened this issue Jul 3, 2020 · 2 comments
Open

fix relative paths to react (at least in admin) #123

npeltier opened this issue Jul 3, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@npeltier
Copy link
Contributor

npeltier commented Jul 3, 2020

out of GH-121, here is instruction to reproduce that issue looks like if you move the build, things don't work anymore (as you could expect with hardcoded relative paths, but it does work for content & structure):

  1. build the whole project
  2. cd apps/admin
  3. mvn clean install && cd target && git clone --depth 1 --branch master git@github.com:adobe/adobe-dx.git checkout && cd checkout

from there if you cd apps/admin/app and run the build of the app, you'll have failure, if you do the same for structure or content, it will work. We need to find a way to stop using static hardcoded paths, as we need those both context to work (this checkout context is what is done when doing a release:perform)

@npeltier npeltier added the bug Something isn't working label Jul 3, 2020
@auniverseaway
Copy link
Member

This is solved for now, but I think there's a more global / dynamic way to solve this issue.

For now there might be a way to use a maven profile to kick off a different npm script that would pull react from a different location. I think the root issue was related to some internal react spectrum things trying to run and dying because react was not in apps/admin/app/node_modules. The solution would most likely be:

  1. A new release profile that runs a different NPM script - <arguments>run build-release</arguments>
  2. This would tell NPM to run with a different set of arguments that could be interpreted by webpack - "build-release": "NODE_ENV=production webpack --mode=production --react=local",
  3. Webpack would pick this change up to change where react is located.

@npeltier
Copy link
Contributor Author

happens again on admin app, hence re-opening, i guess we should go for the long term fix you're proposing @auniverseaway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants