plouc / mozaik-demo

Sample mozaïk app with two dashboards
http://mozaik.rocks/
103 stars 75 forks source link

Documentation incorrect - Post install script should be "npm run build-assets" #15

Open afisher88 opened 6 years ago

afisher88 commented 6 years ago
item info notes
node version 8.10.0
npm version 5.6.0
mozaik-demo version V1
browser Chrome 64.0.3282.186
OS Windows 10 Pro

Expected behavior

Running npm install and then node app.js should start the application.

Actual behavior

> if $BUILD_ASSETS; then npm run build-assets; fi

then was unexpected at this time.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mozaik-dashboard@ postinstall: `if $BUILD_ASSETS; then npm run build-assets; fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mozaik-dashboard@ postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

According to the docs, you can manually run the npm run build script after installing if it fails. However, this throws an error that the script is not found.

Running npm run build-assets works and fixes the problem. The docs should be updated to reflect this.

Steps to reproduce

Run npm install Run node app.js