Skip to content

Not compiling in newest version #323

@The-Podsiadly

Description

@The-Podsiadly

PostHTML does not compile HTML files when using the CLI.

Details

Had to revert to versions:

"posthtml": "^0.12.0",
"posthtml-cli": "^0.5.2",
"posthtml-modules": "^0.4.2"

Error (Logs|Stacks)

PS C:\Users\XXX> npm run build:html

> posthtml -c posthtml.json

Reproduction (Code)

My package.json looked this this:

{
  "scripts": {
    "build:html": "posthtml -c posthtml.json",
    "watch:html": "onchange \"src/views\" -- npm run build:html",
  },
  "devDependencies": {
    "@babel/preset-env": "^7.8.4",
    "autoprefixer": "^9.7.4",
    "babel-loader": "^8.0.6",
    "browser-sync": "^2.26.12",
    "eslint": "^6.8.0",
    "eslint-loader": "^3.0.3",
    "htmlnano": "^0.2.6",
    "imagemin-cli": "^5.1.0",
    "node-sass": "^4.14.1",
    "npm-run-all": "^4.1.5",
    "onchange": "^7.0.2",
    "postcss-cli": "^7.1.2",
    "posthtml": "^0.13.3",
    "posthtml-cli": "^0.7.5",
    "posthtml-modules": "^0.6.2",
    "stylelint": "^13.7.1",
    "webpack": "^4.44.1",
    "webpack-cli": "^3.3.12"
  }
}

And my posthtml.json looked like this:

{
    "input": "src/views/*.html",
    "output": "dist",
    "plugins": {
        "posthtml-modules": {
            "root": "./src/views",
            "initial": true
        },
        "htmlnano": {}
    }
}

Environment

OS node npm/yarn package
Windows 19042.508 [v14.5.0] [npm 6.14.5] [0.13.3]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions