I just tried to install the examples with:
git clone https://github.com/facebook/draft-js.git
cd draft-js
npm install
npm run build
but it fails with:
[13:08:58] Starting 'modules'...
[13:08:58] Starting 'css'...
fs.js:887
return binding.lstat(pathModule._makeLong(path));
^
Error: ENOENT: no such file or directory, lstat '/path/to/draft-js/src/Draft.css'
at Error (native)
at Object.fs.lstatSync (fs.js:887:18)
at DestroyableTransform.TransformStream [as _transform] (/path/to/draft-js/node_modules/gulp-header/index.js:38:12)
at DestroyableTransform.Transform._read (/path/to/draft-js/node_modules/readable-stream/lib/_stream_transform.js:159:10)
at DestroyableTransform.Transform._write (/path/to/draft-js/node_modules/readable-stream/lib/_stream_transform.js:147:83)
at doWrite (/path/to/draft-js/node_modules/readable-stream/lib/_stream_writable.js:313:64)
at writeOrBuffer (/path/to/draft-js/node_modules/readable-stream/lib/_stream_writable.js:302:5)
at DestroyableTransform.Writable.write (/path/to/draft-js/node_modules/readable-stream/lib/_stream_writable.js:241:11)
at Transform.ondata (/path/to/draft-js/node_modules/gulp-clean-css/node_modules/readable-stream/lib/_stream_readable.js:543:20)
at emitOne (events.js:77:13)
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v5.0.0
npm ERR! npm v3.5.4
obviously, there is no src/Draft.css. What's wrong?
+1
@macrozone Temporary solution, comment out the .pipe(header(COPYRIGHT_HEADER, {version: packageData.version})) in gulpfile.js
The css concat step immediately before that does a virtual file thing but there's no file on disk representing the result yet (since we haven't done gulp.dest). Looks like the header plugin started reading from disk recently, which should probably be reverted. See https://github.com/tracker1/gulp-header/pull/34
Nothing we can do at this second except lock to a previous version of gulp-header, which we'll do if this doesn't resolve itself upstream soon.
Workaround:
> cp ./src/Draft.js .
> cp ./dist/Draft.min.js .
> cp ./dist/Draft.css ./src/
> npm run install
@zpao Any temporaty work around?
@geordie i dont find ./dist/Draft.min.js file and its gives missing file error, rest 2 files were present and copied well.
and is it npm run build?
@zpao Thanks a lot, this issue is now solved for me.
@braceta comment it, and everything goes well. Thx.
Thanks guys, will check!