Draft-js: Trouble running the examples from the docs

Created on 17 Jan 2020  路  3Comments  路  Source: facebook/draft-js

I am trying to run the examples from this repo.

As far as I could tell from the repo, I thought that I could run:

git clone <<draft-js-repo>>
sudo npm i

After this I thought, I could just use the browser to go on the html pages. However, on sudo npm i I am getting an error:

[13:49:37] Using gulpfile ~/Code/tutorials/draft-js-expl/draft-js/gulpfile.js
[13:49:37] Starting 'default'...
[13:49:37] Starting 'check-dependencies'...
[13:49:37] Starting '<anonymous>'...
[13:49:37] '<anonymous>' errored after 26 ms
[13:49:37] Error: spawn yarn ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[13:49:37] 'check-dependencies' errored after 27 ms
[13:49:37] 'default' errored after 29 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/florianmartens/.npm/_logs/2020-01-17T12_49_37_841Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/florianmartens/.npm/_logs/2020-01-17T12_49_37_867Z-debug.log

What I am doing wrong. How can I get the examples to work here? Thanks!

Most helpful comment

Hey @claudiopro,

thanks for the reply. I am using [email protected] and [email protected].

Also, thank you guys for working on DraftJS. You are quite literally saving some of my personal projects!

All 3 comments

It works when using yarn.

Hi @florianmartens, that's right - npm is not officially supported although the README may suggest otherwise. What versions of node and npm are you using for our reference?

Hey @claudiopro,

thanks for the reply. I am using [email protected] and [email protected].

Also, thank you guys for working on DraftJS. You are quite literally saving some of my personal projects!

Was this page helpful?
0 / 5 - 0 ratings