This repository shows how to use Mozaïk with npm extensions, installation instructions.
plouc / mozaik-demo Goto Github PK
View Code? Open in Web Editor NEWSample mozaïk app with two dashboards
Home Page: http://mozaik.rocks/
Sample mozaïk app with two dashboards
Home Page: http://mozaik.rocks/
This repository shows how to use Mozaïk with npm extensions, installation instructions.
Hello,
I am not seeing the expected font-awesome assets in the demo.
Steps I ran to get up and running:
git clone [email protected]:plouc/mozaik-demo.git
cd mozaik-demo
npm install
gulp build
node app.js
Versions of the tools I'm using, in case this helps:
$ node -v
v5.8.0
$ npm -v
3.8.1
$ gulp -v
[12:26:29] CLI version 3.9.1
[12:26:29] Local version 3.9.1
Output of gulp build
:
[12:59:51] Using gulpfile ~/dev/node/mozaik-demo/gulpfile.js
[12:59:51] Starting 'copy:fonts'...
[12:59:51] Copying fonts
[12:59:51] Starting 'copy:styles'...
[12:59:51] Copying styles
[12:59:51] Starting 'copy:imgs'...
[12:59:51] Copying images from extensions and themes
[12:59:51] Starting 'collect:styles'...
[12:59:51] Collecting extensions styles
[12:59:51] Finished 'collect:styles' after 10 ms
[12:59:51] Starting 'styles:dev'...
[12:59:51] Compiling stylus code using theme '/Users/macklinu/dev/node/mozaik-demo/node_modules/mozaik/src/themes/night-blue'
[12:59:51] Starting 'js:dev'...
[12:59:51] Finished 'copy:styles' after 74 ms
[12:59:51] Finished 'copy:imgs' after 81 ms
[12:59:51] Finished 'styles:dev' after 536 ms
[12:59:51] Starting 'styles'...
[12:59:51] Finished 'styles' after 7.74 μs
[12:59:51] Finished 'copy:fonts' after 593 ms
[12:59:51] Starting 'copy'...
[12:59:51] Finished 'copy' after 4.68 μs
[12:59:58] Finished 'js:dev' after 7.35 s
[12:59:58] Starting 'js'...
[13:00:04] Finished 'js' after 6.46 s
[13:00:04] Starting 'build'...
[13:00:04] Finished 'build' after 5.46 μs
I am not seeing the icons in the Github Status widget. This is probably an issue with mozaik itself, but I thought I'd post this here to start. Thanks!
item | info | notes |
---|---|---|
node version | v4.4.3 | output from node --version |
npm version | 3.9.5 | output from npm --version |
mozaik-demo version | [email protected]:ruionwriting/mozaik-demo.git | git ref of the demo |
browser | browser used, applyable if the issue is not related to the client |
Run npm install
with no errors to be able to build.
Fails with the following error:
$ npm install
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
> mozaik-dashboard@ postinstall C:\users\rui.marques\Documents\GitHub\mozaik-demo
> if $BUILD_ASSETS; then npm run build-assets; fi
then was unexpected at this time.
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rui.marques\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.3
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
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 'if $BUILD_ASSETS; then npm run build-assets; fi'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mozaik-dashboard package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! if $BUILD_ASSETS; then npm run build-assets; fi
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mozaik-dashboard
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mozaik-dashboard
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\users\rui.marques\Documents\GitHub\mozaik-demo\npm-debug.log
Run npm install
.
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 |
Running npm install
and then node app.js
should start the application.
> 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.
Run npm install
Run node app.js
item | info | notes |
---|---|---|
node version | v6.9.5 | output from node --version |
npm version | 3.10.10 | output from npm --version |
mozaik-demo version | f296609 (v2) | git ref of the demo |
browser | N/A | browser used, applyable if the issue is not related to the client |
Dashboard rotation to work
Dashboard rotation doesn't appear to work.
item | info | notes |
---|---|---|
node version | v8.9.0 | |
npm version | 5.5.1 | |
mozaik-demo version | #61504051511 | |
@mozaik/server version | 2.0.0-alpha.7 |
Server should start without errors, as documented in http://mozaik.rocks/v2/use/
For some reason, instance methods are not found:
> using config file: 'conf/config.yml'
/Users/juha/mozaik-demo/server.js:10
Mozaik.configureFromFile(path.join(__dirname, configFile))
^
TypeError: Mozaik.configureFromFile is not a function
at Object.<anonymous> (/Users/juha/mozaik-demo/server.js:10:8)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
git clone https://github.com/plouc/mozaik-demo.git
cd mozaik-demo
git checkout mozaik-2
npm install
node server.js
item | info | notes |
---|---|---|
node version | v9.2.0 | |
npm version | 5.5.1 | |
mozaik-demo version | origin/mozaik-261504051511fb6396d7c5e6e9cd3d7ff705be1ca | |
browser | Chromium 56.0.2924 |
Demo dashboard should load and display widgets and rotate.
Dashboard fails to load and displays the following error:
An error occurred while fetching configuration: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=undefined&args[]=%20Check%20the%20render%20method%20of%20%60e%60. for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
yarn install
yarn build
node server.js
I see that there is an output folder "build" created after i ran npm build.
When i copy the whole build folder contents and placed under a webserver root,
I manually copied the node_modules but i am not sure how to place configuration.
Copying conf folder doesn't solve the issue.
Please help.
item | info | notes |
---|---|---|
node version | v12.3.1 | |
npm version | 6.9.0 | |
mozaik-demo version | mozaik-2 - 81b62ff |
Zero (low),moderate or high Vurnabilities
found 61 vulnerabilities (37 low, 10 moderate, 14 high) in 15816 scanned packages 60 vulnerabilities require semver-major dependency updates. 1 vulnerability requires manual review. See the full report for details.
npm audit
Makes setting the demo up take quite a few more steps than those listed on the readme (registering an account, getting an API key).
item | info | notes |
---|---|---|
node version | 5.11.1 | |
npm version | 3.8.6 | |
mozaik-demo version | mozaik-2 / 6afba6b | |
browser | ~ |
demo should start :D
It does not start:
yarn start
trigger this error:
yarn start v0.17.10
$ node app.js
/home/jdeniau/code/mozaik-demo/node_modules/mozaik/src/Mozaik.js:1
(function (exports, require, module, __filename, __dirname) { import winston from 'winston';
^^^^^^
SyntaxError: Unexpected token import
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/jdeniau/code/mozaik-demo/app.js:4:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
error Command failed with exit code 1.
The problem I think is that the mozaik
dependency is not "babelized" so the import
does not work.
item | info | notes |
---|---|---|
node version | v8.16.0 | |
npm version | 6.9.0 | |
mozaik-demo version | 2.0.0 | |
browser | All (not a client issue) |
yarn start
should start the back-end and the front-end, and open the site in a browser. Editing and then saving changes should cause the client to update, without having to run yarn build
or node server.js
.
yarn start
starts the client, which cannot connect to the back-end API since it is not running. The client loads in the browser with the message An error occurred while fetching configuration: Unable to fetch configuration: Internal Server Error (500)
.
To see changes, you must run yarn build
followed by node server.js
git checkout mozaik-2
yarn install
yarn build
yarn start
This example project should include a .env.example
file.
The mozaik-2 demo's mozaik dep is 2.0.0-alpha.13, but only 2.0.0-alpha.12 of mozaik exists on github.
If it's possible to make the newer version of the code used in the demo available on github it would be very helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.