Respec: Build command hates Windows

Created on 7 Feb 2018  ·  5Comments  ·  Source: w3c/respec

> [email protected] hb:build C:\Users\sasch\Documents\GitHub\respec
> node ./tools/expandpaths.js -a js/*/templates/*.html js/*/templates/*.css js/core/templates/webidl-contiguous/*.html | xargs handlebars -f js/templates.js

'xargs' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] hb:build: `node ./tools/expandpaths.js -a js/*/templates/*.html js/*/templates/*.css js/core/templates/webidl-contiguous/*.html | xargs handlebars -f js/templates.js`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] hb:build 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\sasch\AppData\Roaming\npm-cache\_logs\2018-02-07T00_56_45_332Z-debug.log

> [email protected] highlight:build C:\Users\sasch\Documents\GitHub\respec
> hljs -n --output js/deps/ xml javascript css http markdown json abnf && mv -f js/deps/highlight.pack.js js/deps/highlight.js

⚒ Starting build for "browser."
Building highlight.js pack file.
Writing highlight.js pack file.
❤️ Finished build.
'mv' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] highlight:build: `hljs -n --output js/deps/ xml javascript css http markdown json abnf && mv -f js/deps/highlight.pack.js js/deps/highlight.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] highlight:build 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\sasch\AppData\Roaming\npm-cache\_logs\2018-02-07T00_56_56_482Z-debug.log

We may do build jobs with Node.js API rather than shell commands.

All 5 comments

Hmm... yeah, it needs to be run in the git-bash on Windows. Was Microsoft planning on releasing a Unix shell? I keep hearing things.

Microsoft provides Ubuntu environment on Windows 10 so users can use bash on it. It's not perfect for ReSpec though, as:

  1. karma fails to run because the Ubuntu environment only has CLI
  2. It's Ubuntu, so npm install wants to install the Ubuntu binary of Electron so that respec2html can only run on Ubuntu

So a Windows user currently have to use two shells to build and test (unless the user has git-bash).

@saschanaz, given your work on #1488, what else would now be needed here?

https://github.com/snyk/snyk/issues/48 remains, but now there is a simple workaround: npm run build:components which does not call snyk.

It's still a problem though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deniak picture deniak  ·  5Comments

marcoscaceres picture marcoscaceres  ·  7Comments

jnurthen picture jnurthen  ·  6Comments

marcoscaceres picture marcoscaceres  ·  6Comments

greenkeeper[bot] picture greenkeeper[bot]  ·  4Comments