scion cli run issue on windows 10
After a clean reinstall of node on Windows 10:
- scion --help outputs cli.js instead of scion
- scion run throws an exception. scion viz works fine.
Here are the details:
C:\work\mission2\scxml-cli>node -v
v14.15.0
C:\work\mission2\scxml-cli>npm -v
6.14.8
C:\work\mission2\scxml-cli>scion --version
1.0.37
C:\work\mission2\scxml-cli>scion --help
cli.js [command]
Commands:
cli.js init [filename] initialize a new SCXML file
cli.js viz [filename] visualize an SCXML file
cli.js compile [filename] compile an SCXML file to JSON or JavaScript
cli.js run [filename] run an SCXML file, and connect a repl to send it
events
cli.js execute [filename] execute an SCXML file (without the repl)
cli.js lint lint an SCXML file (this is an alias for "eslint
--plugin @scion-scxml/eslint-plugin-scharpie")
cli.js monitor start a monitor server
Options:
--version Show version number [boolean]
--help Show help [boolean]
C:\work\mission2\scxml-cli>scion init > foo.scxml
C:\work\mission2\scxml-cli>type foo.scxml
<?xml version="1.0" encoding="UTF-8"?>
<scxml
datamodel="ecmascript"
xmlns="http://www.w3.org/2005/07/scxml"
version="1.0">
<state id="a">
<transition target="b" event="t1"/>
</state>
<state id="b">
<transition target="a" event="t2"/>
</state>
</scxml>
C:\work\mission2\scxml-cli>scion run foo.scxml
scxml.scion property is now deprecated. Use property scxml.core instead (or scion.core in the browser)
exiting state $generated-initial-0
transitioning from $generated-initial-0 to $generated-scxml-0
entering state $generated-scxml-0
entering state a
[ 'a' ]
events.js:292
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:156:25)
at writeGeneric (internal/stream_base_commons.js:147:3)
at ReadStream.Socket._writeGeneric (net.js:785:11)
at ReadStream.Socket._write (net.js:797:8)
at writeOrBuffer (_stream_writable.js:352:12)
at ReadStream.Writable.write (_stream_writable.js:303:10)
at cursorTo (readline.js:1202:17)
at REPLServer.Interface._refreshLine (readline.js:393:3)
at REPLServer.Interface.prompt (readline.js:309:10)
at REPLServer.displayPrompt (repl.js:1077:8)
Emitted 'error' event on ReadStream instance at:
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -4047,
code: 'EPIPE',
syscall: 'write'
}
Edited by Christophe Gerard