Draft.js documentation website needs `react-page-middleware` globally installed
See original GitHub issueIt appears that running the Draft.js website locally, depending on your dependency versions, will result in one of several broken states.
What we saw:
- With a fresh
git clone
of the Draft.js repository and following the instructions in https://github.com/facebook/draft-js/tree/master/website#run-the-server led to a high use of CPU and pages that were never loading - just blank. - After
rm -rf node_moduels && rm yarn.lock
inside/website
and starting fresh, this error appeared:
$ node server/server.js
module.js:529
throw err;
^
Error: Cannot find module 'react-page-middleware'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/gmd/draft-js/website/server/server.js:13:23)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
error Command failed with exit code 1.
I have found that installing react-page-middleware
globally fixes this, for me. Here are my action items for this:
- With a fresh environment and no global installation of
react-page-middleware
, what issues arise when running the docs site locally? Please comment here. - Let’s set the version in the
website/package.json
forreact-page-middleware
to0.4.1
and confirm that this works.
Thanks to @GordyD for surfacing this issue!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Overview | Draft.js
Draft.js is a framework for building rich text editors in React, powered by an immutable model and abstracting over cross-browser ...
Read more >Draft.js
Draft.js fits seamlessly into React applications, abstracting away the details of rendering, selection, and input behavior with a familiar declarative API.
Read more >v0.10 API Migration - Draft.js
DraftEntity instances and storage will be immutable. DraftEntity will no longer be globally accessible. Any changes to entity data will trigger ...
Read more >Issues and Pitfalls - Draft.js
This article addresses some known issues with the Draft editor framework, as well as some common pitfalls that we have encountered while ...
Read more >Editor Component - Draft.js
Optional placeholder string to display when the editor is empty. Note: You can use CSS to style or hide your placeholder as needed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will give this a look. May not find a solution but can hopefully provide some more information from my perspective. 😄
Thanks! That is good news - I’m hoping that this was a corner case somehow triggered by @GordyD 's environment. Still would like to update the docs to a more modern tool but this makes it seem less urgent.