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]: Can't make it work, better documentation please? #261

Closed
piuccio opened this issue Jan 10, 2018 · 2 comments
Closed

[fix]: Can't make it work, better documentation please? #261

piuccio opened this issue Jan 10, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@piuccio
Copy link

piuccio commented Jan 10, 2018

Hi, I just tried to use this module but I'm lost

npm install posthtml-cli
./node_modules/.bin/posthtml -i index.html -o www/index.html

Errors with

(node:2646) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'post-load-plugins'
(node:2646) [DEP0018] 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.

Then I've tried

npm install [email protected]
./node_modules/.bin/posthtml -i index.html -o www/index.html

Errors with

(node:2748) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'indexOf' of undefined

I tried adding a bit more debugging and I get

TypeError: Cannot read property 'indexOf' of undefined
    at node_modules/post-config/lib/index.js:1:1498
    at Array.forEach (<anonymous>)
    at node_modules/post-config/lib/index.js:1:1058
    at Array.reduce (<anonymous>)
    at exports.default (node_modules/post-config/lib/index.js:1:785)
    at node_modules/post-load-plugins/lib/index.js:1:1337
    at PostHTML.<anonymous> (node_modules/posthtml/lib/index.js:143:7)
    at node_modules/posthtml/lib/index.js:173:5
    at new Promise (<anonymous>)
    at PostHTML.process (node_modules/posthtml/lib/index.js:172:10)

This happens in a minified file. I don't want to spend time figuring out what's wrong.

I tired adding a configuration.json, adding config in package.json, installing a bunch of plugins but nothing seems to work.

Can you expand the documentation or provide better error messages for people who use this package for the first time?

@Scrum Scrum changed the title Can't make it work, better documentation please? [fix]: Can't make it work, better documentation please? Jan 10, 2018
@Scrum Scrum self-assigned this Jan 10, 2018
@Scrum Scrum added the bug label Jan 10, 2018
@Scrum Scrum added this to the 0.3.2 milestone Jan 10, 2018
@Scrum
Copy link
Member

Scrum commented Jan 10, 2018

@piuccio Hi, Thank you for your feedback.
This problem has already been announced #252 and #246 , I try to find the time to lose this bug

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

Scrum added a commit that referenced this issue Jan 19, 2018
@Scrum Scrum closed this as completed Jan 21, 2018
@Scrum
Copy link
Member

Scrum commented Jan 21, 2018

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

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