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.

New Project does not run

See original GitHub issue

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I’m using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

I followed the instructions on https://docusaurus.io/docs/installation creating a new classic project with npx create-docusaurus@latest my-website classic

When I try to run the project, it fails to build and crashes no matter what I try.

fail

I am able to build the project with npm run build however I am unable to use npm run serve or npm run start. Both commands fail every time on a completely new project.

Example Repo of new project, coped from the Playground Example. https://github.com/clarkeadg/github-uy6xsq-6hgdno

I forked the main example and even this doesn’t run in the Playground. I didn’t change anything and it gets 5 errors trying to compile and run the project.

Reproducible demo

No response

Steps to reproduce

  1. npx create-docusaurus@latest my-website classic
  2. cd my website
  3. npm install
  4. npm run start

Observe, project does not run!

Expected behavior

I expect that the project will run after following the exact instructions in the documentation for creating a new project.

Actual behavior

0 verbose cli [ 0 verbose cli ‘C:\Program Files\nodejs\node.exe’, 0 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’, 0 verbose cli ‘run’, 0 verbose cli ‘start’ 0 verbose cli ] 1 info using npm@8.5.0 2 info using node@v16.14.2 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 3ms 5 timing config:load:file:C:\Users\bclarke\AppData\Roaming\nvm\v16.14.2\node_modules\npm\npmrc Completed in 1ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 3ms 9 timing config:load:file:C:\Users\bclarke\Work\Code\GitLab\Web\classic-docs.npmrc Completed in 0ms 10 timing config:load:project Completed in 3ms 11 timing config:load:file:H:.npmrc Completed in 1ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Program Files\nodejs\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 1ms 16 timing config:load:credentials Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 15ms 19 timing npm:load:configload Completed in 16ms 20 timing npm:load:setTitle Completed in 1ms 21 timing config:load:flatten Completed in 2ms 22 timing npm:load:display Completed in 3ms 23 verbose logfile C:\Users\bclarke\AppData\Local\npm-cache_logs\2022-07-08T20_30_58_493Z-debug-0.log 24 timing npm:load:logFile Completed in 6ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 0ms 27 timing npm:load Completed in 26ms 28 silly logfile start cleaning logs, removing 2 files 29 timing command:run Completed in 6359ms 30 verbose exit 1 31 timing npm Completed in 6568ms 32 verbose code 1

Your environment

I tried this on Windows, and Ubuntu. Node 16.16.0, Node 16.14.2

"dependencies": {
    "@docusaurus/core": "2.0.0-beta.22",
    "@docusaurus/preset-classic": "2.0.0-beta.22",
    "@mdx-js/react": "^1.6.22",
    "clsx": "^1.2.0",
    "prism-react-renderer": "^1.3.5",
    "react": "^17.0.2",
    "react-dom": "^17.0.2"
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "2.0.0-beta.22"
  },

Self-service

  • I’d be willing to fix this bug myself.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
clarkeadgcommented, Jul 27, 2022

@Josh-Cena I figured out the problem. My computer virus scanner is terminating the process. The package “open” tries to launch Chrome using C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell and that triggers the virus scanner to terminate the process.

I am able to run the project by using the --no-open option when I start the app.

"start": "docusaurus start --no-open",
1reaction
clarkeadgcommented, Jul 9, 2022

This seems to be a problem with my environment. I was able to get it running on another computer with no problems however I am seeing some very odd behavioir on the computer that its not working on.

The screenshot above shows the project starting, and then crashing. Notice it doesn’t say compiled successfully. It just stops.

Here is a screenshot below where you can see the difference.

success

On the broken machine, I was able to get the project to run 1 time on a fresh boot. Then subsequent attempts always fail. Its very odd behaviour, seems like its not shutting down properly. I will try reinstalling my node js and see if it continues. If I figure out the exact problem, I will add more info to this ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "The project doesn't know how to run the profile ...
When I select "Start Debugging" I get a popup that says "The project doesn't know how to run the profile ConsoleREPL".
Read more >
Android Studio new project can not run, throwing error
1) clean project · 2) File -> invalidate caches/ restart. · 3) Restart computer. · 4) See if some other project is compiling...
Read more >
Project not loading properly - Visual Studio Feedback
I have created a new project and copied my code from the old project into the new project - the files are all...
Read more >
dialog to create new project is not appearing - RStudio IDE
The problem I will discuss here is creating a New Project. Steps Taken: Start RStudio; Click File -> New Project. Expected Result: Opens...
Read more >
Migrate to Android Studio - Android Developers
Open Android Studio and click File > New > New Project. Enter a name for your app project and specify the location where...
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