hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
362 stars 74 forks source link

npm run dev fails on Windows #72

Closed BurtHarris closed 6 years ago

BurtHarris commented 6 years ago

using npm run dev generates the following output on Windows from the CMD.exe prompt:

C:\code\node-cbor>npm run dev

> cbor@4.0.0 predev C:\code\node-cbor
> if [ ! -f coverage/index.html ]; then mkdir coverage; cp .waiting.html coverage/index.html; fi

! was unexpected at this time.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cbor@4.0.0 predev: `if [ ! -f coverage/index.html ]; then mkdir coverage; cp .waiting.html coverage/index.html; fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cbor@4.0.0 predev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Burt_\AppData\Roaming\npm-cache\_logs\2018-04-25T02_02_34_180Z-debug.log

Not a big deal, I'll work through it.

BurtHarris commented 6 years ago

A cross-platform solution might be use of https://www.npmjs.com/package/path-exists-cli in the script

hildjj commented 6 years ago

Decided to just write a few lines of node instead of taking another dependency.