Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md for better build #283

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update README.md for better build #283

wants to merge 2 commits into from

Conversation

Innders
Copy link
Member

@Innders Innders commented Oct 9, 2024

No description provided.

@Innders Innders self-assigned this Oct 9, 2024
@Innders Innders requested a review from MustafaJafar October 9, 2024 06:48
@Innders Innders added type: bug Something isn't working type: maintenance Code changes that do not alter product features, such as technical debt resolution and refactoring and removed type: bug Something isn't working labels Oct 9, 2024
@BigRoy
Copy link
Contributor

BigRoy commented Oct 9, 2024

Hope you don't mind me asking a stupid question - but what's the difference between build and start here? How does it behave differently?

What I want is to be able to run the docs live as I edit them, which one should I use?

@MustafaJafar
Copy link
Contributor

What I want is to be able to run the docs live as I edit them, which one should I use?

That would be start.

what's the difference between build and start here? How does it behave differently?

  • Build: generates the website within the build directory, this would be needed to deploy the website.
  • Start: run live from code

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new steps didn't work on my side.
and I had to do the following:
configuration:

npm install -g yarn  # run once in any place
cd {ayon-doc-repo}/website 
yarn add docusaurus --dev  # run once in website directory

run live from server

cd {ayon-doc-repo}/website 
yarn start

@Innders
Copy link
Member Author

Innders commented Oct 9, 2024

the new steps didn't work on my side.

Fixed. added npm install first. You shouldn't (in this testing) be using yarn.

@johhnry
Copy link

johhnry commented Oct 9, 2024

@Innders I think here we should choose whether to use NPM or Yarn. In the current main branch, the website directory has both yarn.lock and package-lock.json which is not advised as stated by Yarn:

❯ yarn install                                                                                     
yarn install v1.22.19
warning package-lock.json found.
Your project contains lock files generated by tools other than Yarn.
It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files.
To clear this warning, remove package-lock.json.

I tend to use Yarn because Docusaurus was built by Facebook, so the build instructions would be (remove package-lock.json):

$ npm install -g yarn
$ cd website
$ yarn install
$ yarn start

Note: I had build issues when using NPM with package-lock.json

Also note that Yarn can be "enabled" by using Corepack (experimental):

$ corepack enable
$ yarn --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance Code changes that do not alter product features, such as technical debt resolution and refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants