Issue: This module doesn't have an associated type. Use a known file extension, or register a loader for it. #86085
Replies: 1 comment
-
|
This error happens because Turbopack doesn't automatically know how to load Fix: Tell Turbopack to treat these file types as static assetsTurbopack supports Add this inside turbopack: {
rules: {
"*.ttf": {
as: "asset",
},
"*.html": {
as: "text",
},
},
},Why this works
❗ImportantDon’t use extensions like If the package truly needs to import HTML as templatesYou can also disable Turbopack for that particular dependency and fall back to Webpack: experimental: {
turbo: {
resolveAlias: {
"patchright-core": false,
},
},
}…but try the simple asset/text rules first — that solves the issue in most cases. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I am getting this issue with loading ttf files from a dependency I installed.
I tried adding rules in config but it didn't work.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions