-
Notifications
You must be signed in to change notification settings - Fork 241
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] __extends
not found in
#1281
Comments
workaround: also pinning |
As part of 2.5.5 there is a new dependency (which implements the __extends() ) [email protected], is your react app including this as well? |
not as a direct dependency but, the applicationinsights-shims that I believe you were referring to was a transitive dependency and in our lockfile |
looking at the package.json files I believe we have the ai-shims module as a direct dependency which is probably why your local dev doesn't repro the issue. Sounds like stale resources, npm install (after cleaning packages should fix the issue) In terms of versioning your packages.json should work with something like (this is a WAG) "dependencies": { And then perhaps (if your embedding these modules into your own) adding the following to the top of your root module (eg. index.ts) This will include (or reuse) the __extends() and __assign() implementations that are now required as we removed our dependency on tslib due to braking compile time issues. |
Followup: If you are using webpack for packaging, it's possible that the chunks it is creating do not include any __assign() or __extends() implementation. In this case you will need to add something like the following to your webpack definition to ensure that it includes the required implementations. This includes examples of using the ai shims implementation or your tslib version.
Additional reference on this usage: https://stackoverflow.com/questions/36556772/webpack-and-typescript-extends |
Closing -- assuming the above resolved the issue -- please reopen if it's still occurring. |
Current version: And added the import in base index But still, getting the error: Any workaround or fix? |
We have not yet published a react update that uses v2.0.0 of the shims (should be later today), if you check your dependencies you should find that v1.0.3 is currently still getting included. |
PR for bumping versions to consume v2.6.2 and shims v2.0.0 is out #1552 |
React v3.1.1 and ReactNative v2.3.1 are now published to NPM |
@MSNev still seeing this error
|
I too am having this issue. And yes, I did read and try the work arounds listed on #1551, #1527, #1280 and #1269 and they did not work either. Also, #1551 was closed four hours after it was opened without any confirmation that the issue was fixed. I'm doing a proof of concept for my team as they decided whether or not to begin using Application Insights but 5 separate issues for the same problem, all closed without confirmation make me worry. Before posting this I made sure to completely remove my node_modules directory ( Here's an excerpt of my package.json file: "@microsoft/applicationinsights-react-js": "3.1.1",
"@microsoft/applicationinsights-shims": "2.0.0",
"@microsoft/applicationinsights-web": "2.6.2", Here's the contents of my tsconfig.json file: {
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": [
"src"
]
}
It should be noted that upgrading |
I've deprecated the react v3.1.1 and react-native v2.3.1 packages until I can publish an updated versions #1553 |
Hi @benrobot #1551 was closed (as commented in the issue) as a duplicate of the listed issues. If your using webpack then based on LOTS of feedback this WILL fix the issue, while I've just deprecated v3.1.1 I am actively working on fixing the issue so that v3.1.2 (when available) won't need these work-arounds as they should just include it automatically. Unfortunately, there is a build configuration issue (which is not trivial) that I need to fix before I can publish this updated version, if I don't get it out today I will be working to get it out tomorrow. |
@MSNev Thank you for the update. I really appreciate you quick responses to our comments. |
I'm updating #1553 with the current state, please see comments there for additional info. |
I see that you have fixed the issue on the version 3.1.2. However, version 3.1.2 have a peerDependency as React 17. Not all the project has the minimum React version as 17.... |
What version of react are you using? @kryalama for visibility as we updated to v17 a few months back |
I am using React 16.13.* |
same issue. |
What packager are you using, if it's webpack then you need to tell webpack that __extends() is included via the specified modules |
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/Screenshot
Having issues with the esm distribution since yesterday, get the following error stack on load of a production create-react-app build:
__extends
not found in production create-react-app with the following importsTried downgrading by pinning
@microsoft/applicationinsights-react-js
to 2.5.4 andtslib
to 1.11.2,didn't help. Also haven't been able to reproduce in the local webpack development server, tested 2.5.4, 3.0.0, and tslib 1.3, 1.11.2
The text was updated successfully, but these errors were encountered: