Comments (8)
from tss-react.
I ran into this error many times myself working with onyxia-ui in onyxai-web.
If you do yarn link
in your UI module and yarn link <your ui moduel>
you get this error at runtime.
You also need to:
cd <your ui library>/node_modules/react
yarn link
cd <your ui library>/node_modules/@types/react
yarn link
cd <your main app>
yarn link react @types/react
from tss-react.
We use a script to automate that if you are interested.
from tss-react.
I ran into this error many times myself working with onyxia-ui in onyxai-web.
If you do
yarn link
in your UI module andyarn link <your ui moduel>
you get this error at runtime.You also need to:
cd <your ui library>/node_modules/react yarn link cd <your ui library>/node_modules/@types/react yarn link cd <your main app> yarn link react @types/react
Thanks for your quick reply buddy :)
Not sure whether we were talking about the same issue.
My issue is that our library is packed and published on NPM, and we use this wrapped package within our main project by installing the package through npm.
The "makeStyles", "createStyles" created within the library could not work in our main repo, as well as all the customized components. :)
Sorry for all these questions haha...
from tss-react.
Is there any easy way to make it working? Because most of the packages don't need to use link :)
We upgraded from V4 and V4 doesn't need link to achieve this.
from tss-react.
This should be an easy fix yes. Can I see the NPM package of your UI lib?
Maybe you have "react"
in dependencies instead of "peerDependencies"
?
from tss-react.
This should be an easy fix yes. Can I see the NPM package of your UI lib? Maybe you have
"react"
in dependencies instead of"peerDependencies"
?
You are right brother, some stupids removed these lines secretly. Now working like a charm... Tons of thanks for your solution on yarn link and I will use it on local development. Really helpful and thanks for your great work!!!!!!
This is an amazing library, really well built!
from tss-react.
Thank you for the kind words, much appreciated!
If you use our script, unless you are using TS_CI, you will need to remove theses lines.
Also you'll have to edit this line and put your own libraries that you need to link.
And of course don't forget to add .yarn_home
to your .gitignore
.
Best
from tss-react.
Related Issues (20)
- How to opt out of RTL transformation? HOT 3
- <GlobalStyles /> don't work properly with next.js app folder HOT 7
- cannot Import multiple makeStyles HOT 1
- Use eslint rule to detect unused classed with imports HOT 2
- React 16.10.0 failed to install @ mui/material HOT 1
- How to use with css and styled apis. HOT 1
- yarn install with pnp mode complains about missing dependency @mui/material HOT 3
- NextJS/MUI/TSS - Cannot read properties of undefined (reading 'classes') HOT 3
- Hard reload after any file change HOT 2
- TssCacheProvider is not working when used with emotion cache and mui 5 HOT 6
- Using with Shadowed Web Components HOT 3
- Next.js: Applying augmentDocumentWithEmotionCache to document breaks AMP pages HOT 2
- The right way typing props when using withStyles HOT 3
- Invalid type for withStyles HOT 4
- Mantine integration
- Using `@import` rule within `<GlobalStyles />` component HOT 8
- `GlobalStyles` create multiple <style data-emotion="css-global">...<style> HOT 1
- Cannot read properties of undefined (reading 'length') in useGuaranteedMemo HOT 3
- MUI V5: Performance issues HOT 4
- Prop `className` did not match. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tss-react.