Monday 10 April 2017

npm wildcards break stylus compilation in cygwin

I have the following package.json

{ "name": "express-example", "version": "0.0.0", "private": true, "scripts": { "build-css": "stylus source/stylesheets/* -o static/css/", "watch-css": "stylus source/stylesheets/index.styl -o static/css -w", "clean": "rm -rf static\\css && mkdir static\\css", "build": "npm run clean && npm run build-css", "watch": "npm run clean && npm run watch-css & nodemon server -e js,jade", "start": "node server" }, "dependencies": { # bleh } }

And when I run npm run build in cygwin, I get the following errors:

Error: ENOENT: no such file or directory, stat 'D:\sherlock\source\stylesheets\*'

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-css"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! express-example@0.0.0 build-css: `stylus source/stylesheets/* -o static/css/`
npm ERR! Exit status 1

However, if I run the command myself (again in cygwin), it works fine:

$ stylus source/stylesheets/*.styl -o static/css/
  compiled static\css\index.css

Is there something I can do to get around this?



via MrDuk

No comments:

Post a Comment