question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where is CompLibrary?

See original GitHub issue

I am trying to follow the Docusaurus tutorial. The generated application is describe as having the following file structure, which is what is actually generated when I run the init command:

β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ doc1.md
β”‚   β”œβ”€β”€ doc2.md
β”‚   β”œβ”€β”€ doc3.md
β”‚   β”œβ”€β”€ exampledoc4.md
β”‚   └── exampledoc5.md
└── website
    β”œβ”€β”€ README.md
    β”œβ”€β”€ blog
    β”‚   β”œβ”€β”€ 2016-03-11-blog-post.md
    β”‚   β”œβ”€β”€ 2017-04-10-blog-post-two.md
    β”‚   β”œβ”€β”€ 2017-09-25-testing-rss.md
    β”‚   β”œβ”€β”€ 2017-09-26-adding-rss.md
    β”‚   └── 2017-10-24-new-version-1.0.0.md
    β”œβ”€β”€ core
    β”‚   └── Footer.js
    β”œβ”€β”€ package.json
    β”œβ”€β”€ pages
    β”‚   └── en
    β”‚       β”œβ”€β”€ help.js
    β”‚       β”œβ”€β”€ index.js
    β”‚       └── users.js
    β”œβ”€β”€ sidebars.json
    β”œβ”€β”€ siteConfig.js
    β”œβ”€β”€ static
    β”‚   β”œβ”€β”€ css
    β”‚   β”‚   └── custom.css
    β”‚   └── img
    β”‚       β”œβ”€β”€ docusaurus.svg
    β”‚       β”œβ”€β”€ favicon
    β”‚       β”‚   └── favicon.ico
    β”‚       β”œβ”€β”€ favicon.png
    β”‚       └── oss_logo.png
    └── yarn.lock

But in the next step, we are provided with the following HelloWorld page code:

const React = require('react');

const CompLibrary = require('../../core/CompLibrary.js');

const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;

function HelloWorld(props) {
  return (
    <div className="docMainWrapper wrapper">
      <Container className="mainContainer documentContainer postContainer">
        <h1>Hello World!</h1>
        <p>This is my first page!</p>
      </Container>
    </div>
  );
}

module.exports = HelloWorld;

There is no CompLibrary.js in the /website/core/ folder. Am I missing something?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
endilieycommented, Sep 4, 2019

Nodejs require in docu v1 case will start from docusaurus own folder in node_modules/

Its kinda time consuming to explain, but short answer is above

0reactions
slorbercommented, Mar 23, 2021

I have many things to backport in the migration cli/doc, including a solution for the comp library migration.

In the meantime, you can copy the comps here and use them in place of the v1 components: https://github.com/facebook/jest/tree/v27.0.0-next.5/website/src/components/v1

For simple cases, you can use the new <Interpolate> component instead of <MarkdownBlock>, as shipping a full MD parser client-side adds more weight to your site

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create Pages - Docusaurus v1
The docs folder is in the root of your Docusaurus project, one level above website .
Read more >
Salesforce Lightning Component Library
The Component Library is the Lightning components developer reference. Rapidly develop apps with our responsive, reusable building blocks.
Read more >
Import 'sap.ui.comp' for using ValueHelpDialog control
Hello Experts, I'm trying to import the 'sap.ui.comp' library:
Read more >
React event handler not executing on Docusaurus page
core/CompLibrary.js'); class SignUp extends React.Component { constructor(props) { super(props); this.state = {value: ''}; this.
Read more >
Cant copy comp library songs to ipod touc… - Apple Community
Question: Q: Cant copy comp library songs to ipod touch. In library device menu can synch device though. Restored Ipod touch from back...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found