2
0
mirror of https://github.com/therootcompany/greenlock.js.git synced 2025-03-02 14:50:45 +00:00

Couldn't make it work #14

Open
opened 2020-02-15 05:32:08 +00:00 by Ghost · 3 comments

The package looks incredibly promising. But I couldn't make any of default examples work. Whatever example I use I get the following error:

Unhandled Rejection at:  Promise Promise {
  <rejected> TypeError: Cannot read property 'manager' of undefined
      at Object.Init._init (node_modules/@root/greenlock/lib/init.js:143:12)
      at Object.greenlock._create (node_modules/@root/greenlock/greenlock.js:58:22)
      at Object.G.create (node_modules/@root/greenlock/greenlock.js:482:15)
      at Promise (index.js:502:35)

Can you please help?

The package looks incredibly promising. But I couldn't make any of default examples work. Whatever example I use I get the following error: ``` Unhandled Rejection at: Promise Promise { <rejected> TypeError: Cannot read property 'manager' of undefined at Object.Init._init (node_modules/@root/greenlock/lib/init.js:143:12) at Object.greenlock._create (node_modules/@root/greenlock/greenlock.js:58:22) at Object.G.create (node_modules/@root/greenlock/greenlock.js:482:15) at Promise (index.js:502:35) ``` Can you please help?
Author

So I got past this error by specifying packageRoot: __dirname in greenlock.create. Now it just freezes up. Outputs ACME Directory URL: https://acme-v02.api.letsencrypt.org/directory and that's it. Doesn't do anything.

So I got past this error by specifying ``packageRoot: __dirname`` in ``greenlock.create``. Now it just freezes up. Outputs ``ACME Directory URL: https://acme-v02.api.letsencrypt.org/directory`` and that's it. Doesn't do anything.
Author

So the error I receive in the end is Error: connect ETIMEDOUT [mydomain.com]:80 at TCPConnectWrap.afterConnect. All ports are open on my domain, the express runs without any problems. So what could be wrong with greenlock?

So the error I receive in the end is ``Error: connect ETIMEDOUT [mydomain.com]:80 at TCPConnectWrap.afterConnect``. All ports are open on my domain, the express runs without any problems. So what could be wrong with greenlock?
Author

I also found I needed to specify packageRoot: __dirname in greenlock.create to make it work. A similar fix is mentioned in #10 (comment).

Apart from that I had an issue with the pkg.author format (see https://docs.npmjs.com/files/package.json#people-fields-author-contributors), but after debugging those, I did get all of it working.

Are you still seeing the timeout? If the error is literally ETIMEDOUT [mydomain.com]:80 then maybe it's because LetsEncrypt cannot reach http://mydomain.com:80/?

I also found I needed to specify `packageRoot: __dirname` in greenlock.create to make it work. A similar fix is mentioned in https://git.rootprojects.org/root/greenlock.js/issues/10#issue-2688. Apart from that I had an issue with the pkg.author format (see https://docs.npmjs.com/files/package.json#people-fields-author-contributors), but after debugging those, I did get all of it working. Are you still seeing the timeout? If the error is literally `ETIMEDOUT [mydomain.com]:80` then maybe it's because LetsEncrypt cannot reach http://mydomain.com:80/?
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/greenlock.js#14
No description provided.