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

Cannot find module /src/iconVersion #196

Closed
B-E-A-F opened this issue Jul 3, 2024 · 5 comments
Closed

Cannot find module /src/iconVersion #196

B-E-A-F opened this issue Jul 3, 2024 · 5 comments
Assignees

Comments

@B-E-A-F
Copy link

B-E-A-F commented Jul 3, 2024

Describe the bug

While attempting to use svelte-kit, I'm unable to use auro-select. I think it could possibly be an SSR issue?

[vite] Error when evaluating SSR module /src/routes/contactdetails/+page.svelte: failed to import "@aurodesignsystem/auro-select"
|- Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/[email protected]/Documents/Projects/ManageContactDetails/node_modules/@aurodesignsystem/auro-menu/src/iconVersion' imported from /Users/[email protected]/Documents/Projects/ManageContactDetails/node_modules/@aurodesignsystem/auro-menu/src/auro-menuoption.js
    at finalizeResolution (node:internal/modules/esm/resolve:264:11)
    at moduleResolve (node:internal/modules/esm/resolve:917:10)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

To Reproduce

Steps to reproduce the behavior:

  1. Create a svelte-kit app
  2. npm i @aurodesignsystem/auro-menu
  3. Import component import '@aurodesignsystem/auro-select'
  4. See error

Expected behavior

Screenshots

image

Desktop (please complete the following information):

  • OS: MacOS (m1)
  • Browser: Chrome
  • Version: 126.0.6478.127
@B-E-A-F B-E-A-F added auro-select not-reviewed Issue has not been reviewed by Auro team members Type: Bug Bug or Bug fixes labels Jul 3, 2024
@Patrick-Daly-AA
Copy link

first glance looks like this might be an issue with either the build process or the bundler. @jason-capsule42 to do further investigation.

@Patrick-Daly-AA Patrick-Daly-AA removed the not-reviewed Issue has not been reviewed by Auro team members label Jul 3, 2024
@B-E-A-F
Copy link
Author

B-E-A-F commented Jul 10, 2024

Hi @jason-capsule42, is there an update on this? I'm not blocked yet, but very close to being a blocker on using auro for our current project.

@blackfalcon
Copy link
Member

The auro-select component has not been updated to be fully ESM SSR compatible, please see https://github.com/orgs/AlaskaAirlines/discussions/502

The auro-select element has a dependency on auro-menu which has a dependency on mark.js which hasn't had a release for 5 years.

Unless we can find a ESM workaround for mark.js, please see this recommendation:
https://github.com/orgs/AlaskaAirlines/discussions/502#discussioncomment-8456578

@blackfalcon
Copy link
Member

Your error stack does elude to this line of code:

https://github.com/AlaskaAirlines/auro-menu/blob/main/src/auro-menuoption.js#L13

To be ESM compatible, this JavaScript reference needs to use .js, .cjs or .mjs. That could also be part of the issue.

@jordanjones243
Copy link
Contributor

This was fixed by auro-menu v4.0.0 release and therefore this ticket can be closed.

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

No branches or pull requests

5 participants