-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(core): handle case where package.json is not available at CWD #7187
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-7187--docusaurus-2.netlify.app/ |
Size Change: +117 B (0%) Total Size: 799 kB
ℹ️ View Unchanged
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
We could have used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️ not really fan, particularly the DOCUSAURUS_VERSION env var
* Revert "fix(core): handle case where package.json is not available at CWD (#7187)" This reverts commit 3b32a41. * properly fix Co-authored-by: Joshua Chen <[email protected]>
Motivation
Fix #7161. Moreover, this PR adds a
DOCUSAURUS_VERSION
env so that different modules can read this version without re-importing the package.json file.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Delete
website/package.json
, and add"dev": "cd website && docusaurus start",
to the root package.json. The site starts gracefully: