Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compiling in newest version #323

Closed
The-Podsiadly opened this issue Sep 17, 2020 · 10 comments
Closed

Not compiling in newest version #323

The-Podsiadly opened this issue Sep 17, 2020 · 10 comments
Labels
Milestone

Comments

@The-Podsiadly
Copy link

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]
@Scrum
Copy link
Member

Scrum commented Sep 18, 2020

@The-Podsiadly Hi, from the description it is not clear which error you get?

In a working example https:/test-issues/posthtml-cli-issue-333

@Scrum Scrum transferred this issue from posthtml/posthtml Sep 18, 2020
@The-Podsiadly
Copy link
Author

The problem is is that no error showed showed. It ran the command but didn't compile an html file into the dist/ folder. I tried debugging it, and still got no logs related to PostHTML.

Were you able to get the files to compile into a dist/ using the latest versions of PostHTML, PostHTML-cli, and PostHTML-modules?

@Scrum
Copy link
Member

Scrum commented Sep 18, 2020

The problem is is that no error showed showed. It ran the command but didn't compile an html file into the dist/ folder. I tried debugging it, and still got no logs related to PostHTML.

Were you able to get the files to compile into a dist/ using the latest versions of PostHTML, PostHTML-cli, and PostHTML-modules?

Yes, you can be sure by cloning the project https:/test-issues/posthtml-cli-issue-333

@The-Podsiadly
Copy link
Author

The-Podsiadly commented Sep 18, 2020

I ran both npm run build and npx posthtml -c posthtml.json and didn't receive an output in the terminal and it didn't compile a new index.html in the dist/ folder.

@Scrum
Copy link
Member

Scrum commented Sep 18, 2020

hmm, previously the problem may be due to the used window. I'll try to think of something how to test it

@The-Podsiadly
Copy link
Author

The-Podsiadly commented Sep 18, 2020

I decided to work back and revert to older versions for each of the 3 posthtml packages while keeping 2 of 3 at the latest version. These package versions worked:

In my opinion, on my system, [email protected] might be broken on my system.


Upgrading NodeJS [14.11.0] and npm [6.14.8] didn't solve it.

@patorpey
Copy link

I have experienced the same behavior of no output without any error using the recent releases. I also rolled back one release at a time (of just posthtml-cli) and found that it works for [email protected] but not 0.7.2 and later.

Environment:
node v12.16.1, Windows 7 Ent. SP1

@Scrum
Copy link
Member

Scrum commented Sep 21, 2020

@patorpey @The-Podsiadly thanks for the find, this is related to the package fast-glob

@The-Podsiadly
Copy link
Author

@Scrum How did you figure that out?

@Scrum
Copy link
Member

Scrum commented Sep 21, 2020

@Scrum How did you figure that out?

I had to do a lot of tests using github actions https:/inside-demo/fast-glob-demo/pull/2/checks?check_run_id=1144028881

see step Run tests

@Scrum Scrum added this to the 0.7.6 milestone Sep 22, 2020
@Scrum Scrum closed this as completed in 2447d87 Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants