bpmn-io / bpmn-js-color-picker

A simple color picker for your BPMN elements.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example not working

fspegni opened this issue · comments

Describe the Bug

Following the instructions for running the example (one command), I get an error.

Steps to Reproduce

$ git clone <repository>
$ cd bpmn-js-in-color/example
$ npm run dev

> bpmn-js-in-color@0.2.0 dev /home/.../git/bpmn-js-in-color
> grunt auto-build

Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'load-grunt-tasks'
>> Require stack:
>> - /home/.../git/bpmn-js-in-color/Gruntfile.js
>> - /usr/share/nodejs/grunt/lib/grunt/task.js
>> - /usr/share/nodejs/grunt/lib/grunt.js
>> - /usr/share/nodejs/grunt-cli/bin/grunt
Warning: Task "auto-build" not found. Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! bpmn-js-in-color@0.2.0 dev: `grunt auto-build`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the bpmn-js-in-color@0.2.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

Expected Behavior

I expect some sort of indication reporting that I can test the BPMN viewer/modeler with colors

Environment

  • Host (Browser/Node version), if applicable: [e.g. MS Edge 18, Chrome 69, Node 10 LTS] : browser not relevant, node v12.18.2
  • OS: [e.g. Windows 7] Linux Ubuntu 20.10
  • Library version: [e.g. 2.0.0] the current version on the repository

Have you tried npm i?

Any updates on this @fspegni ?

Hi, sorry for my late reply. npm i fixed it apparently. There is an error appearing in the console, as follows:

$ git clone ...
$ cd bpmn-js-in-color/example
$ npm i
$ npm run dev

> bpmn-js-in-color@0.2.0 dev /home/.../git/bpmn-js-in-color
> grunt auto-build

Running "copy:bpmn_js" (copy) task
Copied 8 files

Running "copy:colors" (copy) task
Copied 1 file

Running "browserify:watch" (browserify) task
>> Bundle example/app.bundled.js created.

Running "connect:livereload" (connect) task
Started connect web server on http://localhost:9013

Running "watch" task
Waiting...
(node:219791) UnhandledPromiseRejectionWarning: Error: Exited with code 4
  at ChildProcess.<anonymous> (/home/.../git/bpmn-js-in-color/node_modules/opn/index.js:83:13)
  at Object.onceWrapper (events.js:422:26)
  at ChildProcess.emit (events.js:315:20)
  at maybeClose (internal/child_process.js:1021:16)
  at Socket.<anonymous> (internal/child_process.js:443:11)
  at Socket.emit (events.js:315:20)
  at Pipe.<anonymous> (net.js:675:12)

(node:219791) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:219791) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

If I open the browser at localhost:9013 I can see the running example and interact with it and change the color. The message in the console looks suspicious, though.

Thanks for your help

Great to hear 👍 The error in the log seems to be related to API updates on an underlying dependency. As long it does not crash the example, I think it's okay.

Feel free to open an issue if you think it should be fixed.