Closed cristianpjensen closed 2 years ago
hey @cristianpjensen, thank you for reporting this! Try to do this following https://github.com/doczjs/docz/issues/1637#issuecomment-897427356, and let me know it goes.
As far we noticed, there are some quirks in react-native that we're still not supporting properly, but maybe this workaround will work for you.
Hello @renatobenks, thanks for your quick response. I tried your suggestion, however, it did not change the situation. I also tried your suggestion without typescript: true
, however then it is not able to find any exports.
So, the situation is that whenever I remove typescript: true
from doczrc.js, it cannot find any exports, but when I add it, some error occurs regarding webpack. I have no experience with webpack, so I do not know what it means.
After further investigation of the other error, I think it has something to do with it not installing my dependencies to the Gatsby website. When I add typescript: true
, it is able to find the exports, but it cannot find the dependencies that those exports rely on. I think, but I am not sure if this should even produce a problem.
@cristianpjensen did you try to put the src
option as well?
Well, based on the error shown above, the webpack has been unable to parse your dependency files to build the gatsby project, so I believe it's because docz is not properly configured, so try to follow this example to see what you got: https://github.com/doczjs/docz/blob/main/examples/react-native
how it worked for you @cristianpjensen, can we close this one?
Bug Report
Describe the bug
Docz cannot find exports to insert components in .mdx files.
To Reproduce
I am building a react native project with expo. I am also using TypeScript. I would like to integrate docz for documentation. However, I am not able to import components into my .mdx files. I had found an issue describing this same issue and that issue was resolved by adding
to the
doczrc.js
. However, this does not work for me, because that produces another error, which has something to do with Webpack I think. This produces the following error when building the development server:I do not know what to do about this error, since I cannot find anyone who has the same problem.
Expected behavior
I would expect the component to be imported in the .mdx files and working as it should.
Environment