Closed lttb closed 4 years ago
Facing the same issue,do you find any workaround?
Facing same problem, the only way I figured out is terminating npm and building it again.
Same thing here, pages are not created on the .docz folder when the new build is generated.
it seems that an issue was caused by this fix: https://github.com/doczjs/docz/commit/dad228fff5cbe4c9f989d96a16f8f3c598b98bea#diff-10b0f76ede3ea173b8dda2af33c892a9
that fix stops completely re-creating all pages on every file change
, but it also looks like that it stops creating new pages too
in example, exports.createPages = require('./lib/createPagesStatefully')
works fine
so, in general, we should make efficient incremented updates for already created pages, but also still create new pages too
as I understood gatsby docs well (https://www.gatsbyjs.org/docs/node-apis/#createPagesStatefully), with createPagesStatefully
it's required to watch pages independently, like this plugin: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/src/gatsby-node.js#L60
but maybe we can just call createPage
only for new pages on a simple createPages
event?
Hey @lttb,
I think you accurately described the problem and the solution. We need to replace createPagesStatefully back with createPagr
Hey @lttb,
I think you accurately described the problem and the solution. We need to replace createPagesStatefully back with createPages and only create if we receive a new file event or add a file-added listener in createPagesStatefully.
Anyone up for submitting a PR? Happy to help with it!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any precision of the solution?
This is still an issue, any outlook on a solution?
Bug Report
Describe the bug
There is a gatsby 404 error for new pages without restart of dev-build.
The page after creation is visible in the sidebar:
But it's not accessible by the link and the route:
It's required to restart the build to make the new page work.
To Reproduce
yarn create docz-app docz-app-basic --example basic
yarn dev
src/hello.mdx
Expected behavior
It's expected that the new page will be available on fly.
Environment