Can't import component
See original GitHub issueBug Report
Describe the bug
I just wanted to play with docz and check how it works. I’ve created sample component and sample page and I get this error:
WARNING Compiled with 1 warnings 14:18:41
warning in ./src/components/Foo/Foo.mdx
"export 'Foo' was not found in './Foo'
Foo.mdx code
---
name: Foo
---
import { Foo } from "./Foo"
# Foo
this is foo:
<Foo>sample</Foo>
Foo.tsx code
import React, { PureComponent } from "react";
export class Foo extends PureComponent {
render() {
return this.props.children;
}
}
Environment
- OS: macOS 10.13.6
- Node/npm version: Node 10.8.0
Have you seen something similar earlier?
// Right now I’m unable to start docz server (versions 0.10.0 and later):
✖ fatal Failed to process your server: TypeError: Cannot read property 'replace' of undefined
at getRepoUrl (/aaa/node_modules/docz-core/dist/index.js:1:7375)
at getInitialConfig (/aaa/node_modules/docz-core/dist/index.js:1:9931)
at Object.init (/aaa/node_modules/docz-core/dist/index.js:1:10148)
at Promise.all.Array.from.map (/aaa/node_modules/docz-core/dist/index.js:1:10825)
at Array.map (<anonymous>)
at DataServer.init (/aaa/node_modules/docz-core/dist/index.js:1:10802)
at Object.dev (/aaa/node_modules/docz-core/dist/index.js:1:24808)
at process._tickCallback (internal/process/next_tick.js:68:7)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
javascript - ReactJS - Can't import component - Stack Overflow
I'm developing a little single page app and I'm just trying to create my components to import within my main component. TestComponent.jsx import...
Read more >Cannot import component into PowerApps - Reddit
I am trying to import a component I created into another tenant. I have tried several different ways to get it in there...
Read more >Cannot import components from @primer/components #1010
Describe the bug Cannot import components from @primer/components. To Reproduce Steps to reproduce the behavior: npx create-react-app my-app Click on ...
Read more >Cannot import component inside other component - Laracasts
Hello,. I can't seem to figure this out. When I import .vue components from within my app.js file, everything works. Copy Code import...
Read more >Importing Components in React From Other Files - Upmostly
Importing Components in React From Other Files: Step-by-Step Tutorial ... We cannot import from the file importError.js from within the ...
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
When I change it to default export, there are no errors on the build but after I click “Foo” tab on the left I see blue icon of docz on the right and browser crashes (I have to kill chrome process).
@pedronauck Could you please reopen? Thanks
UPD: I created a new one, don’t need to reopen, thanks!