Skip to content

Angular 9: Module not found: Error: Can't resolve '@google/model-viewer' #2209

Answered by anders8
takarka asked this question in Q&A
Discussion options

You must be logged in to vote

As of Angular 14, both of these will import:

  • import "@google/model-viewer"
  • import '@google/model-viewer/dist/model-viewer';

however, the second one (import '@google/model-viewer/dist/model-viewer';) will then fail with an error message:
node_modules/@google/model-viewer/dist/model-viewer.d.ts:897:27 - error TS2749: 'MeshoptDecoder' refers to a value, but is being used as a type here.

It's working for me with import "@google/model-viewer" after I also installed "@types/webxr" from npm

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by elalish
Comment options

You must be logged in to vote
1 reply
@elalish
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #1300 on April 01, 2021 20:26.