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

New web-components version (v2.1.0) doesn't load #11274

Closed
2 tasks done
abdonrd opened this issue Dec 26, 2023 · 5 comments · Fixed by #11283
Closed
2 tasks done

New web-components version (v2.1.0) doesn't load #11274

abdonrd opened this issue Dec 26, 2023 · 5 comments · Fixed by #11283
Labels
bug Something isn't working dev Needs some dev work

Comments

@abdonrd
Copy link
Contributor

abdonrd commented Dec 26, 2023

Description

When update from v2.0.1 to v2.1.0, importing components gives an error:

[vite-node] [ERR_LOAD_URL] @carbon/web-components/es/components/button/button.js

at @carbon/web-components/es/components/button/button.js

✅ Application with @carbon/[email protected]:
https://stackblitz.com/edit/github-gkn31f-tzrvfj?file=package.json

Screenshot 2023-12-26 at 2 16 44 PM

❌ Application with @carbon/[email protected]:
https://stackblitz.com/edit/github-gkn31f-gn6xrr?file=package.json

Screenshot 2023-12-26 at 2 16 39 PM

Component(s) impacted

All.

Browser

Chrome, Safari, Firefox, Microsoft Edge

Severity

Severity 1 = The design is broken in a critical way that blocks users from completing tasks or damages the brand. Affects major functionality, no workaround.

Application/website

IBM Quantum

Package

@carbon/web-components

Code of Conduct

@abdonrd abdonrd added bug Something isn't working dev Needs some dev work labels Dec 26, 2023
@abdonrd
Copy link
Contributor Author

abdonrd commented Dec 26, 2023

Reviewing changes in the package.json, why private?

@abdonrd
Copy link
Contributor Author

abdonrd commented Dec 26, 2023

This is the diffing I found:

Screenshot 2023-12-26 at 2 40 58 PM

Why this?

lib only have .js.map files:

Screenshot 2023-12-26 at 2 44 04 PM

@abdonrd
Copy link
Contributor Author

abdonrd commented Dec 26, 2023

It works if I change from:

    "./es/components/*": {
      "node": "./lib/components/*",
      "default": "./es/components/*"
    },

To:

    "./es/components/*": {
      "default": "./es/components/*"
    },

@jeffchew
Copy link
Member

@kennylam @ariellalgilmore @annawen1 this may have happened after we merged in.

Reviewing changes in the package.json, why private?

@kennylam Not sure if we need this anymore now that everything is merged in?

@annawen1 annawen1 linked a pull request Jan 2, 2024 that will close this issue
kodiakhq bot pushed a commit that referenced this issue Jan 2, 2024
### Related Ticket(s)

Closes #11274 

### Description

Remove the `node` exports field that was pointing to the `lib` folder containing only the source map files.

### Changelog

**Removed**

- `node` exports field

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
@abdonrd
Copy link
Contributor Author

abdonrd commented Jan 2, 2024

@abdonrd abdonrd closed this as completed Jan 2, 2024
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this issue Mar 12, 2024
)

Closes carbon-design-system#11274

Remove the `node` exports field that was pointing to the `lib` folder containing only the source map files.

**Removed**

- `node` exports field

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this issue Jun 11, 2024
)

### Related Ticket(s)

Closes carbon-design-system#11274 

### Description

Remove the `node` exports field that was pointing to the `lib` folder containing only the source map files.

### Changelog

**Removed**

- `node` exports field

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev Needs some dev work
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants