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

[fix]: Cannot compile in v3.0.0 #252

Closed
seamile4kairi opened this issue Jun 24, 2017 · 3 comments
Closed

[fix]: Cannot compile in v3.0.0 #252

seamile4kairi opened this issue Jun 24, 2017 · 3 comments
Labels
Milestone

Comments

@seamile4kairi
Copy link

seamile4kairi commented Jun 24, 2017

Hi.
I've installed the latest version, but the following error is displayed and HTML is not compiled.

{ _: [],
  version: false,
  v: false,
  h: false,
  help: false,
  o: 'dist/',
  output: 'dist/',
  i: [ 'src/**/*.html' ],
  input: [ 'src/**/*.html' ],
  c: 'posthtml.config.js',
  config: 'posthtml.config.js',
  '$0': '/PATH/TO/PROJECT/ROOT/node_modules/.bin/posthtml' }
(node:82379) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'post-load-plugins'
(node:82379) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

My settings is here:

package.json

{
  ...
  "scripts": {
    ...
    "build:markup": "posthtml -i src/**/*.html -o dist/ -c posthtml.config.js",
    ...
  },
  "devDependencies": {
    ...
    "posthtml-cli": "^0.3.0",
    "posthtml-w3c": "^0.8.1",
    ...
  },
  ...
}

posthtml.config.js

module.exports = (ctx) => {
  return {
    from: ctx.from,
    to: ctx.to,
    plugins: {
      'posthtml-w3c': {}
    }
  }
};

I use the latest version of Node.js and npm on macOS Sierra.

@Scrum
Copy link
Member

Scrum commented Jun 27, 2017

@seamile4kairi Hi, thanks for feedback, Is associated with incorrect work post-load-plugins. I'm working on it. I recommend use options --auto-off for a while.

@Scrum Scrum added the bug label Jun 27, 2017
@Scrum Scrum added this to the 0.3.1 milestone Jun 27, 2017
@seamile4kairi
Copy link
Author

@gitscrum Thanks for your reply.
The following message is still returned, but now HTML file seems to be output correctly.

{ _: [],
  version: false,
  v: false,
  h: false,
  help: false,
  i: [ 'src/**/*.html' ],
  input: [ 'src/**/*.html' ],
  o: 'dist/',
  output: 'dist/',
  c: 'posthtml.config.js',
  config: 'posthtml.config.js',
  'auto-off': true,
  autoOff: true,
  '$0': '/PATH/TO/PROJECT/ROOT/node_modules/.bin/posthtml' }

Waiting for the bug fix in v0.3.1!

seamile4kairi pushed a commit to seamile4kairi/kairerplate that referenced this issue Jun 28, 2017
@Scrum Scrum changed the title Cannot compile in v3.0.0 [fix]: Cannot compile in v3.0.0 Jun 28, 2017
@Scrum Scrum modified the milestones: 0.3.1, 0.3.2 Oct 10, 2017
@Scrum Scrum closed this as completed in cc64eca Jan 21, 2018
@Scrum
Copy link
Member

Scrum commented Jan 21, 2018

@seamile4kairi thanks for your feedback, now everything should work.

and you do not need to create a configuration file unless there is an additional option for plug-ins. See more information about post-load-plugins

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

2 participants