-
Notifications
You must be signed in to change notification settings - Fork 101
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
Unable to start a production build of concerto-ui in a CRA #110
Comments
Not sure I understand this. We don't have |
The problem occurs when you build an app that includes one of our components as a dependency |
Same issues is occurring if try to use MarkdownEditor as dependency. Both of the libraries are pointing to the modelmanager class in concerto-core library.
|
Took a quick look at this with @dselman and I have a suspicion it could be due to the way we export Though This may have to do with tweaking the rollup configuration? |
Now looking at the dependencies... We seem to have multiple versions of
https://github.com/accordproject/cicero/blob/master/packages/cicero-core/package.json#L80 The rest of |
@jeromesimeon can we release Cicero to align with concerto-core 0.82.7? |
I think I'm able to reproduce this following @mttrbrts 's instructions. You need serve. I used
In the browser I get an empty page: |
I'm confused about how this relates to the issue. AFAICT there is no cicero involved in the demo here. Only Concerto and Concerto UI. In my
The version of |
I can reproduce, both in the repo mentioned in the original issue and in a brand new create-react-app environment. I have tried with ui-markdown-editor, ui-contract-editor, and ui-concerto, and each produce the same error. I'm still researching the problem, but I wanted to bring up this older similar (possibly the same?) issue I found in case it rings any bells (cc @jeromesimeon ): accordproject/concerto-ui#26 |
I had completely forgotten about this. Looking back at that other issue, I think it was addressed by moving away from CRA and using webpack instead. I don't think I ever figured out what the root of the problem is, but I admit CRA feels like a complete magic box to me... |
The last version that does not have this error is This is particularly strange as it does not seem like anything changed between |
Alright, I was having trouble following how the This leads me to believe the issue may have been introduced in |
One last note before I leave this for the night. I think I see where @dselman was coming from with the differing versions - I read through another older issue (accordproject/concerto#47) around conflicting versions causing trouble for
However, as @jeromesimeon already mentioned, the error is thrown even when the only version of |
I think this is actually on to something. Between the old I think that might be why this fails. I think I can figure out a fix, but this will need republish of |
A brute-force confirmation that the issue is with the overriding of Without those you can properly start the app: |
I think this open issue in babel is related: babel/babel#4452 |
Do we ever actually call |
@dselman When we call
|
Hi @shift-a-bit ! We aim to have this working with CRA in the future, but for now you can use this starter React app with a basic Webpack and Babel config to get started with using AP web components in a React app. The app includes an example of both Concerto Form and Markdown Editor. Note that it's using a new micropublish of these components - |
Hi @DianaLease ,Thanks a lot. I have checked the starter app. I can eject the configs from CRA for the time. |
Having the same issue after building. When trying to reproduce it in a more basic project, I also had this issue with the start script. I've put it on a codesanbox ( even though it's not working in there, because of some process 😕 ) where you can zipit, yarn it and see the issue. Also it's important to register that I've managed to build a working solution by changing both the |
I've reproduced this with a new App created using
My theory is that our override of |
See this issue, which appears to be our case as well: parcel-bundler/parcel#2347 We are setting a flag inside the constructor, which we refer to in our |
Replicated in https://github.com/shift-a-bit/concerto-ui-react-demo
Bug Report 🐛
Unable to start a production build of concerto-ui in a CRA. The development build works fine.
Reported by @shift-a-bit in AP Slack workspace.
Originally, I thought that this might be related to the new rollup pipeline, but replacing
concerto-ui
withconcerto-ui-react@0.84.0
orconcerto-ui-react@0.83.0
gives the same result.Steps to Reproduce
The text was updated successfully, but these errors were encountered: