okdistribute / dat-server

A web ui and http interface for archiving dats.
45 stars 8 forks source link

watchify: not found #9

Closed victorperin closed 6 years ago

victorperin commented 6 years ago

Fist: thanks for the project, if you don't mind I'll help you build it. :)

I run all steps you told, and I`m getting this error:

$ npm start

> dat-server@1.0.2 start /home/victor/study/dat-server/dat-server
> npm run watch & node cli.js

> dat-server@1.0.2 watch /home/victor/study/dat-server/dat-server
> watchify -t [ babelify --presets [ react ] ] frontend.js -o static/bundle.js

sh: 1: watchify: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! dat-server@1.0.2 watch: `watchify -t [ babelify --presets [ react ] ] frontend.js -o static/bundle.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the dat-server@1.0.2 watch 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!     /home/victor/.npm/_logs/2018-04-06T04_53_59_822Z-debug.log
http://localhost:8080
listening

Altrought the server keeps starting. (But the host button doesn't do any action)

victorperin commented 6 years ago

I wrote a dockerfile to reproduce the bug:

FROM node:9

RUN git clone https://github.com/karissa/dat-server.git
WORKDIR dat-server
RUN npm install

RUN cp example.config.json config.json

ENTRYPOINT npm start

you can run it with:

docker build -t dat-server .
docker run dat-server
okdistribute commented 6 years ago

Try npm install watchify, I guess it's missing from the package.json. Sorry about that!