Can't resolve '@theme-ui/css/dist/types' in '...node_modules/@theme-ui/core/dist'
See original GitHub issueAs of yesterday “theme-ui”: “0.4.0-rc.1” alll was well, but as I come to continue development of my gatsby site I have this breakage and am still trying to follow the flow as to what has changed.
The referenced file exists but vscode complains that it ‘Contains emphasized items’ … but no errors show in the code in the file … except Cannot read file ‘…/node_modules/tsconfig.json’. in the vscode log.
Edit: Initially I had theme-ui 0.4.0-rc.1 and theme-ui component pinned at 0.3.1, but it seems that no longer works for some reason and the only way I get get a build, was to revert both back to 0.3.1
I thought I’d ask in case someone can help me locate the issue?
Thanks in advance.
failed Building production JavaScript and CSS bundles - 50.127s
ERROR #98124 WEBPACK
Generating JavaScript bundles failed
Can't resolve '@theme-ui/css/dist/types' in '/home/local/site/node_modules/@theme-ui/core/dist'
If you're trying to use a package make sure that '@theme-ui/css/dist/types' is installed. If you're trying to use a local file make sure that the path is correct.
File: ../node_modules/@theme-ui/core/dist/index.esm.js
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Webpack suddenly fails to compile due to "Module not found ...
I had this issue and solved by fixing my modules resolution settings in Jest. With the current state of things, my package-lock includes:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I broke it! I’m sorry 🙏🙇
0.4.0-rc.3 builds incorrectly.
import of
@theme-ui/css/dist/types
shouldn’t land in@theme-ui/core/dist/index.esm.js
.Adding
"0.4.0-rc.1"
to resolutions for"@theme-ui/core"
,"@theme-ui/css" and
“@theme-ui/mdx”` should be an okayish workaround.It has to happen with rc.1 and rc.2 as well because even if you explicitly request rc.1 (or 2) from your package.json theme-ui still uses
^0.4.0-rc.1
(with a caret) internally, which resolves to rc.3 currently. Thus both versions will be used (one from your code, one from theme-ui internal dependencies; check the nested node_modules folder).If someone urgently needs a hotfix you should be able to add a resolution to the package.json like so:
Otherwise just wait… a release candidate is not stable software. 😉