小编Jor*_*h-M的帖子

Node-sass 未编译

尝试使用node-sass从scss制作css文件。我的package.json:

 {
  "name": "hello-webpack",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "scss": "node-sass -watch scss -o css"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "sass": "^1.26.10",
    "sass-loader": "^9.0.3",
    "webpack": "^4.44.1",
    "webpack-cli": "^3.3.11"
  },
  "dependencies": {
    "node-sass": "^4.14.1"
  }
}
Run Code Online (Sandbox Code Playgroud)

但是当我尝试 npm run scss 时,我看到这个错误:

> node-sass -watch scss -o css

internal/validators.js:120
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at …
Run Code Online (Sandbox Code Playgroud)

sass node-sass

3
推荐指数
1
解决办法
3839
查看次数

标签 统计

node-sass ×1

sass ×1