-
Notifications
You must be signed in to change notification settings - Fork 242
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
[BUG] Version 2.6.2 built with react-script build results in a runtime error #1551
Comments
Same behavior as above. |
This is a duplicate issue and is related to these issues (which include workarounds) Additionally, v3.1.1 of the react plugin will address this as it will no longer be using the applicationinsights-shim v1.0.3 module Closing this specific issue due to duplications |
React v3.1.1 and ReactNative v2.3.1 are now published to NPM |
I've deprecated the react v3.1.1 and react-native v2.3.1 packages until I can publish an updated versions #1553 |
I am new to this NPM and I am facing the same error with the below dependencies in dev environment. The dev environment used to work fine till Friday. Can some one explain why this is happening all of a sudden?, Please let me know the possible work-around to overcome this issue. |
The __extends issue has be "around" since May 2020 (because of #1269 and the workaround we put in place), as part of the workaround we created the application-shims module which exposed global versions of the __extends() and __assign() tslib helpers, and as these where imported in the index.ts of each module it was "generally" available (in devlopment mode), when using production mode for several packagers this caused the code that "exposes" the global versions of the tslib helpers to not get included and thus the exceptions __extends() not found and others. The workaround for this for webpack IS to use the ProdiverPlugin and force these helpers to always be present in every created chunk and use either the tslib versions or the ai-shims version.
And as part of v2.6.2 we "fixed" (removed) the globals for the main Application Insights module (#1280) and all usages of these modules no longer need to use the workaround as during packaging these are now re-written to directly use the new v2.0.0 of the ai-shims components. The missed / unexpected issue however, is that because we (currently) have to wait for the main modules to be published before we can publish the react and react-native plugins, the code directly in these plugins still require the global functions to be present (and they are defined in the main modules -- so dev / non-chunked versions work), and because the main v2.6.2 no longer import and expose the globals it now requires that either the ReactPlugin is included in totality or the above work-around is used. I attempted to "fix" this eariler today by publishing v3.1.1, which "mostly" worked, however, the packaging step to re-write the usage got missed, thus making v3.1.1 a major breaking version (this is why I deprecated it). I am planning to publish v3.1.2 to complete the fix and removed of the globals by the end of tomorrow (was trying for today, but validating the fix is a little more complex) the Issue I'm using for this is #1553.
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
After upgrading to
@microsoft/[email protected]
(from 2.6.1) in a react project, the built solution (viareact-scripts
) produces a runtime error, resulting in a blank screen.The following error is present in the console:
Steps to Reproduce
create-react-app
project with@microsoft/[email protected]
&@microsoft/[email protected]
Additional info
This issue only occurs when built. Starting a development server works fine.
The text was updated successfully, but these errors were encountered: