首页 > 解决方案 > package.json 中的 npm 脚本未编译 css

问题描述

{
  "name": "job_portal",
  "version": "1.0.0",
  "main": "index.js",
  "devDependencies": {
    "bulma": "^0.9.3",
    "node-sass": "^6.0.1"
  },
  "scripts": {
    "css-build": "node-sass --omit-source-map-url sass/mystyles.scss css/mystyles.css",
    "css-watch": "npm run css-build -- --watch",
    "start": "npm run css-watch"
  },
  "author": "",
  "license": "ISC",
  "description": ""
}

显示错误:

An output directory must be specified when compiling a directory

标签: npm-scriptsnode-sass

解决方案


推荐阅读