0

我有以下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 } }

当我npm run build在 cygwin 中运行时,出现以下错误:

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

但是,如果我自己运行命令(再次在 cygwin 中),它工作正常:

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

我能做些什么来解决这个问题吗?

4

0 回答 0