question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Draft.js documentation website needs `react-page-middleware` globally installed

See original GitHub issue

It appears that running the Draft.js website locally, depending on your dependency versions, will result in one of several broken states.

What we saw:

$ 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:

  1. With a fresh environment and no global installation of react-page-middleware, what issues arise when running the docs site locally? Please comment here.
  2. Let’s set the version in the website/package.json for react-page-middleware to 0.4.1 and confirm that this works.

Thanks to @GordyD for surfacing this issue!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jackyho112commented, Nov 7, 2017

I will give this a look. May not find a solution but can hopefully provide some more information from my perspective. 😄

1reaction
flarniecommented, Nov 13, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found