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

[Bug]: Module parse failed: Export 'Infinity' is not defined (2620:1241) | WatsonHealthLaunchStudy_1.propTypes = iconPropTypes; | } #15306

Closed
2 tasks done
edumorlom opened this issue Dec 2, 2023 · 9 comments · Fixed by #15384

Comments

@edumorlom
Copy link

Package

@carbon/icons-react

Browser

Chrome, Safari, Firefox, Edge

Package version

11.31.0

React version

18.2.0

Description

After upgrading to 11.31.0, I now see the following error when doing npm run dev:

./src/app/Dashboard/layout.tsx
 ⨯ ./node_modules/@carbon/icons-react/es/generated/bucket-8.js
Module parse failed: Export 'Infinity' is not defined (2620:1241)
|     WatsonHealthLaunchStudy_1.propTypes = iconPropTypes;
| }
> export { IbmCloudPakIntegration, IbmCloudPakMantaAutomatedDataLineage, IbmCloudPakMulticloudMgmt, IbmCloudPakNetezza, IbmCloudPakNetworkAutomation, IbmCloudPakSecurity, IbmCloudPakSystem, IbmCloudPakWatsonAiops, IbmSecurity, IbmSecurityServices, IbmWatsonAssistant, IbmWatsonDiscovery, IbmWatsonKnowledgeCatalog, IbmWatsonKnowledgeStudio, IbmWatsonLanguageTranslator, IbmWatsonMachineLearning, IbmWatsonNaturalLanguageClassifier, IbmWatsonNaturalLanguageUnderstanding, IbmWatsonOpenscale, IbmWatsonOrders, IbmWatsonQuery, IbmWatsonSpeechToText, IbmWatsonStudio, IbmWatsonTextToSpeech, IbmWatsonToneAnalyzer, IbmWatsonxAssistant, IbmWatsonxCodeAssistant, IbmWatsonxCodeAssistantForZ, IbmWatsonxCodeAssistantForZRefactor, IbmWatsonxOrchestrate, IbmZCloudModStack, IbmZCloudProvisioning, IbmZEnvironmentsDevSecOps, IbmZOs, IbmZOsAiControlInterface, IbmZOsContainers, IbmZOsPackageManager, IbmZProcessorCapacityReference, IceAccretion, IceVision, IdManagement, Idea, Identification, Image, ImageCopy, ImageMedical, ImageReference, ImageSearch, ImageSearchAlt, ImageService, ImportExport, ImproveRelevance, InProgress, InProgressError, InProgressWarning, Incomplete, IncompleteCancel, IncompleteError, IncompleteWarning, IncreaseLevel, Industry, Infinity, Information, InformationDisabled, InformationFilled, InformationSquare, InformationSquareFilled, InfrastructureClassic, Insert, InsertPage, InsertSyntax, Inspection, InstanceBx, InstanceClassic, InstanceCx, InstanceMx, InstanceVirtual, Integration, IntentRequestActive, IntentRequestCreate, IntentRequestHeal, IntentRequestInactive, IntentRequestScaleIn, IntentRequestScaleOut, IntentRequestUninstall, IntentRequestUpgrade, Interactions, Intersect, IntrusionPrevention, InventoryManagement, IotConnect, IotPlatform, Ip, Iso, IsoFilled, IsoOutline, JoinFull, JoinInner, JoinLeft, JoinOuter, JoinRight, Jpg, JsError, Json, JsonReference, JumpLink, KeepDry, Keyboard, KeyboardOff, Kubernetes, KubernetesIpAddress, KubernetesPod, Label, Language, Laptop, Lasso, LassoPolygon, Launch, QID, WatsonHealthICa_2D, WatsonHealthImageAvailabilityLocal, WatsonHealthImageAvailabilityRetrieving, WatsonHealthImageAvailabilityUnavailable, WatsonHealthInteractiveSegmentationCursor, WatsonHealthLaunchStudy_1 };
| 

Import trace for requested module:
./node_modules/@carbon/icons-react/es/generated/bucket-8.js
./node_modules/@carbon/icons-react/es/index.js

Reproduction/example

Usnure

Steps to reproduce

Unsure

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@vasharma05
Copy link

Hi @edumorlom!
Is there any fix/ workaround brought up to resolve this issue? We at OpenMRS are also facing the same issue and is a blocker on our side.
Thanks!

CC: @ibacher @denniskigen

@edumorlom
Copy link
Author

i was able to just downgrade to the previous version and everything works.

@edumorlom
Copy link
Author

@denniskigen this works for me:

├── @carbon/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Make sure you delete node_modules, otherwise it won't work.

@denniskigen
Copy link
Contributor

Thanks, @edumorlom. In our case, we mitigated the situation by adding @carbon/icons-react as a direct dependency and pinning it to 11.26.0 (an older version) https://github.com/openmrs/openmrs-esm-core/pull/834/files

@Kynato
Copy link

Kynato commented Dec 11, 2023

Both newest and legacy
("@carbon/icons-react": "11.29.0",
"@carbon/react": "1.42.1",)
versions doesn't work for me.
They worked for like an hour and then stopped. Can't fix it for a while now.

@tay1orjones
Copy link
Member

Hi, we're having a hard time reproducing this. Could you reproduce the issue in a stackblitz with your specific configuration, and post the link back here? It's hard to figure out exactly what could be going wrong without seeing the issue firsthand.

@tay1orjones tay1orjones added the status: needs reproduction Issues lacking a code reproduction label Dec 12, 2023
@Yaren-IT
Copy link

Hi, we're having a hard time reproducing this. Could you reproduce the issue in a stackblitz with your specific configuration, and post the link back here? It's hard to figure out exactly what could be going wrong without seeing the issue firsthand.

Hi, I have the same problem.
Yesterday I had this issue on another bug request of mine and so I have the basis to reproduce this in codesandbox.
I made a new repo for this bug and you can see the bug here:
https://codesandbox.io/p/github/Yaren-IT/carbon-nextjs-infinity/main

My current workaround with npm is to set overrides in package.json like this:

,
  "overrides": {
    "@carbon/icons-react": "11.30.1"
  }

hth

@dbryan17
Copy link

dbryan17 commented Dec 12, 2023

@tay1orjones You can check the codesandbox I have for this issue. Currently showing this error.
https://codesandbox.io/p/devbox/headermenu-issue-88wg4c?file=%2Fapp%2Fnavbar.js%3A26%2C47

@alisonjoseph
Copy link
Member

Thanks for the reproductions, I'm also able to reproduce locally. I believe this may be related to adding the Infinity icon in this PR. I think we need to rename it because Infinity is a global property.
https://www.w3schools.com/jsref/jsref_infinity.asp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

9 participants