Problems while running npm on Windows (PhantomJS crashed)

Hi BPMN.IO Community,

i would like to modify the BPMN-js Library an use it in one of my projects for the university.

Sadly i am fairly new to JavaScript and npm and i have run into trouble creating the library.
So far i have downloaded the prerequisites nodejs,npm, git and grunt. All of the are on the newest Patch Level.

After this i proceeded as written in the installation instructions on the git repository. (Also tried the automated setup.bat provided there)

Still i get the following Errors when running npm run all on bpmn-js and diagram-js.

<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>
0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘all’ ]
2 info using npm@3.10.3
3 info using node@v6.6.0
4 verbose run-script [ ‘preall’, ‘all’, ‘postall’ ]
5 info lifecycle diagram-js@0.17.0~preall: diagram-js@0.17.0
6 silly lifecycle diagram-js@0.17.0~preall: no script for preall, continuing
7 info lifecycle diagram-js@0.17.0~all: diagram-js@0.17.0
8 verbose lifecycle diagram-js@0.17.0~all: unsafe-perm in lifecycle true
9 verbose lifecycle diagram-js@0.17.0~all: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\BPMNAUTO\diagram-js\node_modules.bin;C:\Program Files\nodejs;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Broadcom\Broadcom 802.11;c:\Program Files (x86)\Intel\iCLS Client;c:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Java\jdk1.8.0_40\bin;C:\Windows\system32\config\systemprofile.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\Markus\AppData\Roaming\npm;C:\Program Files (x86)\Common Files\Acronis\TibMounter64
10 verbose lifecycle diagram-js@0.17.0~all: CWD: C:\BPMNAUTO\diagram-js
11 silly lifecycle diagram-js@0.17.0~all: Args: [ ‘/d /s /c’, ‘grunt’ ]
12 silly lifecycle diagram-js@0.17.0~all: Returned: code: 3 signal: null
13 info lifecycle diagram-js@0.17.0~all: Failed to exec all script
14 verbose stack Error: diagram-js@0.17.0 all: grunt
14 verbose stack Exit status 3
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid diagram-js@0.17.0
16 verbose cwd C:\BPMNAUTO\diagram-js
17 error Windows_NT 6.1.7601
18 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “all”
19 error node v6.6.0
20 error npm v3.10.3
21 error code ELIFECYCLE
22 error diagram-js@0.17.0 all: grunt
22 error Exit status 3
23 error Failed at the diagram-js@0.17.0 all script ‘grunt’.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the diagram-js package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error grunt
23 error You can get information on how to open an issue for this project with:
23 error npm bugs diagram-js
23 error Or if that isn’t available, you can get their info via:
23 error npm owner ls diagram-js
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

For nodejs i tried the LTS and current version but with both of them produced the same result.
All steps were done on Win7 and Ubuntu to check for OS problems but both didn’t work.

Would be very nice if someone could help me cause i don’t know where i made a mistake.

Thank you very much in andvance.

Your log says executing grunt failed. What did it fail with?

11 silly lifecycle diagram-js@0.17.0~all: Args: [ ‘/d /s /c’, ‘grunt’ ]
12 silly lifecycle diagram-js@0.17.0~all: Returned: code: 3 signal: null

Hi nikku thank you very much for your help
here a screenshot from the result.

it looks like a component phantomjs crashed and could not be restarted.

Please try chrome instead of PhantomJS for running the test suite. The test failures (it says PhantomJS crashed) are due to a bug in WebKit as it seems.

To test the library with Chrome execute

TEST_BROWSERS=Chrome npm run all

Hi nikku

thx for the tipp, now chrome opens and grunt runs way longer but right at the end it aborts.
Looks like some coordinates are outside the expected range?
Any Idea what i can do?

Hey @bpmn4win,

Those are related to the type of font that you have in your operating system. No need to worry about it.

Cheers,
Ricardo

Hi Ricardo,

thx for your help.

I used the --force option to ignore the errors but the build still aborts.
Any Idea what I can change with my fonts to make it work?

Use node_modules/.bin/grunt --force.

grunt is the command that is run internally when you execute npm run all.

@ricardomatias @pedesen Seems like we should add a way to disable the text related specs or try to make them more robust across on different operating systems. Last time I checked tests were passing on Windows 7.

I added diagram-js#194 as a follow up ticket.

Hi everyone,

with the --force option the build finished and the thread can be closed.

Thank you for you help. Now on to the task of creating a prototype for my project…