-
-
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
Should not assume package.json is available at CWD #7161
Comments
This comment was marked as spam.
This comment was marked as spam.
This has been brought up in the past, but I didn't find is severe enough for an immediate fix. The problem is indeed that we assume the package.json file exists at the root of CWD (and site dir, which defaults to CWD, but I can't remember clearly, it's all a bit messy). We have multiple places where we make that assumption. I plan to do a minor refactor regarding importing various JSON modules (mostly package.json) and I'll take a look at this. For the time being, please prefer using the yarn start docs |
it's ok, thanks! |
This is a good issue. |
Actually, let's re-open. I strongly suspect we have made some naïve assumptions about folder structure that can probably be made more robust, I just haven't really looked through everything yet |
Your tree structure doesn't show where
Why do you want this to be supported exactly? this is not the typical fs structure for a Docusaurus site Technically we could look for a |
@slorber This is the case where a user has a "monorepo-like" FS structure but does not have multiple package.json files. I've seen this multiple times, and very often they would use |
Have you read the Contributing Guidelines on issues?
Description
I put everything related to docusaurus in the
docs
folder and level it withpackage.json
, there was no problem before, but recently there was an error.everything related to the document is in the
docs
folder, thedocs
directory structure as follows:package.json
then running the
npm run docs:build
and other docusaurus-related commands to get an error:Self-service
The text was updated successfully, but these errors were encountered: