New Project does not run
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn 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.
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
npx create-docusaurus@latest my-website classic
cd my website
npm install
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:
- Created a year ago
- Comments:6
Top GitHub Comments
@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.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.
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.