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 |
slorber
left a comment
There was a problem hiding this comment.
🤷♂️ not really fan, particularly the DOCUSAURUS_VERSION env var
Motivation
Fix #7161. Moreover, this PR adds a
DOCUSAURUS_VERSIONenv 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: