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

Runtime error ERR_IMPORT_ASSERTION_TYPE_MISSING when loading AppUI modules #1165

Closed
grigasp opened this issue Dec 19, 2024 · 0 comments · Fixed by #1174
Closed

Runtime error ERR_IMPORT_ASSERTION_TYPE_MISSING when loading AppUI modules #1165

grigasp opened this issue Dec 19, 2024 · 0 comments · Fixed by #1174
Assignees
Labels
bug Something isn't working

Comments

@grigasp
Copy link
Member

grigasp commented Dec 19, 2024

Describe the bug

After bumping AppUI dependencies to 5.0, I started getting ERR_IMPORT_ASSERTION_TYPE_MISSING runtime error when running tests in Node.js:

 Exception during run: TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///E:/gh/presentation/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@itwin+core-_hop4dcoppuvgzpra66kjlrorqy/node_modules/@itwin/core-react/lib/core-react/UiCore.json" needs an import attribute of type "json"
    at validateAttributes (node:internal/modules/esm/assert:89:15)
    at defaultLoad (node:internal/modules/esm/load:153:3)
    at async nextLoad (node:internal/modules/esm/hooks:868:22)
    at async nextLoad (node:internal/modules/esm/hooks:868:22)
    at async Hooks.load (node:internal/modules/esm/hooks:451:20)
    at async handleMessage (node:internal/modules/esm/worker:196:18) {
  code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'
}

To Reproduce

  1. Open https://stackblitz.com/edit/stackblitz-starters-fw77mnn3?file=index.js
  2. Run npm run test

Expected Behavior

No errors

Screenshots

No response

Desktop (please complete the applicable information)

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants