-
Notifications
You must be signed in to change notification settings - Fork 207
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
feat(wallet): Create react ui scaffold with ses #3879
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Definitely a bare-bones starting point.
<meta charset="utf-8" /> | ||
<script src="lockdown.umd.js"></script> | ||
<script> | ||
if ('%NODE_ENV%' === 'production') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we allow this to run in dev mode, we get the following error:
Uncaught TypeError: Cannot add property reactStack, object is not extensible
at p (index.js:1)
at K (index.js:1)
at Module.de (index.js:1)
at Object../node_modules/react-dev-utils/webpackHotDevClient.js (webpackHotDevClient.js:45)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object.1 (logo.svg:1)
at __webpack_require__ (bootstrap:851)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @samsiegart could you either (or both) include the error text (not screenshot) when run against an uncompressed react? Or explain here how to reproduce.
@kriskowal @mhofman @dckc doesn't look like an override mistake. Looks like it is genuinely trying to monkey patch something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node module itself comes already compressed, I might have some trouble trying to get an uncompressed version. To repro, you can remove the surrounding if ('%NODE_ENV%' === 'production')
so that it runs in dev mode.
Then cd agoric-sdk/packages/dapp-svelte-wallet
, agoric install
, cd react-ui
, yarn install
and yarn start
to run local dev mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be clear, this error happens in production mode / once built outside of a dev server? I'm only half surprised react attempts to monkey patch error (I remember reading something about them trying to capture the error stack)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this error happens in production mode / once built outside of a dev server?
The opposite. The error only happens in non-prod mode if the code that's currently guarded by the if statement runs without that guard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be the culprit from the package source code (wasn't able to figure out how to import and run it uncompressed though): https://github.com/facebook/create-react-app/blob/bb64e31a81eb12d688c14713dce812143688750a/packages/react-error-overlay/src/effects/proxyConsole.js
0304b1b
to
60bc534
Compare
Looks like it is assigning to console. That you can accommodate after
lockdown.
On Thu, Sep 23, 2021 at 8:34 PM Samuel Siegart ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/dapp-svelte-wallet/react-ui/public/index.html
<#3879 (comment)>:
> @@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <script src="lockdown.umd.js"></script>
+ <script>
+ if ('%NODE_ENV%' === 'production') {
This appears to be the culprit from the package source code (wasn't able
to figure out how to import and run it uncompressed though):
https://github.com/facebook/create-react-app/blob/bb64e31a81eb12d688c14713dce812143688750a/packages/react-error-overlay/src/effects/proxyConsole.js
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3879 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACC3TBX7H33X2RALEJ3VHTUDPWVTANCNFSM5ESOGMHA>
.
--
Cheers,
--MarkM
|
No description provided.