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.

docusaurus.config.js not found when running "docusaurus build --no-minify=true"

See original GitHub issue

🐛 Bug Report

I need to build the project with --no-minify=true

Have you read the Contributing Guidelines on issues?

yes.

To Reproduce

  1. start a new docusaurus project with npx @docusaurus/init@next init my-website classic
  2. run yarn build --no-minify=true

Expected behavior

I expected to build without minify files.

Actual Behavior

Error: docusaurus.config.js not found
    at Object.loadConfig (c:\works\teste\node_modules\@docusaurus\core\lib\server\config.js:43:15)
    at loadContext (c:\works\teste\node_modules\@docusaurus\core\lib\server\index.js:24:33)
    at Object.load (c:\works\teste\node_modules\@docusaurus\core\lib\server\index.js:52:21)
    at build (c:\works\teste\node_modules\@docusaurus\core\lib\commands\build.js:59:34)
    at args (c:\works\teste\node_modules\@docusaurus\core\bin\docusaurus.js:29:5)
    at Command.cli.command.description.option.option.option.action (c:\works\teste\node_modules\@docusaurus\core\bin\docusaurus.js:53:23)
    at Command.listener (c:\works\teste\node_modules\commander\index.js:370:29)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (c:\works\teste\node_modules\commander\index.js:892:12)
    at Command.parse (c:\works\teste\node_modules\commander\index.js:642:21)
    at Object.<anonymous> (c:\works\teste\node_modules\@docusaurus\core\bin\docusaurus.js:120:5)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Your Environment

  • Docusaurus version used: 2.0.0-alpha.58
  • Environment name and version: Node.js 10.20.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
slorbercommented, Aug 8, 2020

npm run start, not npm start run 😃

image

0reactions
naim5amcommented, Apr 25, 2021

I was facing the same issue. Running with clean node -v => v14.16.1 and yarn --version => 1.22.10 I had to npm install @babel/core --save to get going

Read more comments on GitHub >

github_iconTop Results From Across the Web

docusaurus.config.js
API reference for Docusaurus configuration file.
Read more >
Deployment - Docusaurus
Deploy your Docusaurus app for production on a range of static site hosting services.
Read more >
CLI - Docusaurus
Docusaurus provides a set of scripts to help you generate, serve, ... --no-minify, false, Build website without minimizing JS/CSS bundles.
Read more >
Installation - Docusaurus
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can...
Read more >
Configuration - Docusaurus
config.js helps you, your collaborators, and your open source contributors to be able to focus on documentation while still being able to ...
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