docs icon indicating copy to clipboard operation
docs copied to clipboard

unable to build/start docs

Open ThomasBurleson opened this issue 4 years ago • 1 comments

harmony branch

Per instructions in README , I use

  • yarn install
  • yarn start

During the docusaurus client build, I get the following errors:

$ docusaurus start
Starting the development server...
Docusaurus website is running at "http://localhost:3000/".

✖ Client
  Compiled with some errors in 13.56s

ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/thomasburleson/Documents/projects/TeamBit/docs
ℹ 「wds」: 404s will fallback to /index.html


Module parse failed: Unexpected token (11:27)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  * @name Error
|  */
> export function Error(props: HTMLAttributes<HTMLDivElement>) {
|       const { className, children, ...rest } = props;
|       if (!children) return null;
Module not found: Error: Can't resolve 'react-live' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.code.react-playground/dist'
Module not found: Error: Can't resolve '@teambit/base-ui.surfaces.split-pane.split-pane' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.code.react-playground/dist'
Module not found: Error: Can't resolve '@teambit/base-ui.surfaces.split-pane.hover-splitter' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.code.react-playground/dist'
Module not found: Error: Can't resolve 'react-use-dimensions' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.code.react-playground/dist'
Module not found: Error: Can't resolve 'use-debounce' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.code.react-playground/dist'
Module parse failed: Unexpected token (17:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import styles from './react-playground.module.scss';
| 
> export type CodeScope = { [key: string]: any };
| 
| export type PlaygroundProps = {
Module parse failed: Unexpected token (9:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import styles from './snippet.module.scss';
| 
> export type { CodeScope } from '@teambit/documenter.code.react-playground';
| 
| export type SnippetProps = {
Module not found: Error: Can't resolve 'copy-to-clipboard' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.ui.code-snippet/dist'
Module not found: Error: Can't resolve '@teambit/evangelist.elements.icon' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.ui.code-snippet/dist'
Module not found: Error: Can't resolve 'react-syntax-highlighter/dist/esm/prism-light' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.ui.code-snippet/dist'
Module not found: Error: Can't resolve 'react-syntax-highlighter/dist/esm/languages/prism/tsx' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.ui.code-snippet/dist'
Module not found: Error: Can't resolve 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/documenter.ui.code-snippet/dist'
Module not found: Error: Can't resolve '@teambit/base-ui.routing.link' in '/Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/@teambit/mdx.ui.docs.link/dist'
Module parse failed: Unexpected token (6:26)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import styles from './link.module.scss';
| 
> export function Link(props: LinkProps) {
|   return <RoutingLink {...props} className={styles.link} external />;
| }
Module parse failed: Unexpected token (6:42)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { Snippet as BaseSnippet, SnippetProps } from '@teambit/documenter.markdown.hybrid-live-code-snippet';
| 
> export function Snippet({ scope, ...rest }: SnippetProps) {
|   const components = useContext(MDXScopeContext);
|   const _scope = useMemo(() => ({ ...components, mdx, ...scope }), [components, scope, mdx]);
SyntaxError: /Users/thomasburleson/Documents/projects/TeamBit/docs/docs/aspects/html/node_modules/prism-react-renderer/README.md: Expected corresponding JSX closing tag for <br>. (12:0)
  10 |   prism-react-renderer 🖌️
  11 |   <br>
> 12 | </h1>
     | ^
  13 | <p align="center" style="font-size: 1.2rem;">
  14 |   A lean <a href="https://github.com/PrismJS/prism">Prism</a> highlighter component for React<br>
  15 |   Comes with everything to render Prismjs highlighted code directly to React (Native) elements, global-pollution-free!

Note that I also used bit compile before yarn start

ThomasBurleson avatar Oct 29 '21 16:10 ThomasBurleson

we are working on a new version of the docs which should be out very very soon. for now yarn install and yarn start should work but if you use a bit command before that then you might have problems and might need to remove node_modules to get it to work.

debs-obrien avatar Nov 21 '21 19:11 debs-obrien