waitingsong / node-win32-api

win32 api
MIT License
430 stars 55 forks source link

requires Node 12, but dependencies ffi -> ref not compatible with Node 12?!? #20

Closed jordanbrown0 closed 4 years ago

jordanbrown0 commented 4 years ago

I'm new to the npm ecosystem so maybe I am missing something totally obvious.

I try to install win32-api, but I get errors because ref won't build. Google searches tell me that ref is incompatible, as yet, with Node 12. So I backed out to Node 10, but then find that win32-api depends on ECMAScript modules, added in Node 12.

I found lxe/ref#node-12 and its friends, and they install OK, but the install of win32-api still tries to install the old ref.

I found ffi-napi and its friends, and they install OK, but the install of win32-api still tries to install ffi and thus the old ref.

What am I missing?

jordanbrown0 commented 4 years ago

And is there a more appropriate way to have asked this question?

waitingsong commented 4 years ago

I've tried new napi ,but not ok https://github.com/waitingsong/node-win32-api/tree/napi

find that win32-api depends on ECMAScript modules, added in Node 12

what's you mean? The build includes both cjs and ems files. works also under node v8.

jordanbrown0 commented 4 years ago

Apparently when I tried Node 10 I found the "import" and "export" statements, and since those didn't work I stopped. I have it working now. Thanks!

jordanbrown0 commented 4 years ago

Is there a way to get it to work under Node 12?