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

Node.js 10 requirement and more issues? #11

Closed
danielpeintner opened this issue Jul 12, 2018 · 5 comments
Closed

Node.js 10 requirement and more issues? #11

danielpeintner opened this issue Jul 12, 2018 · 5 comments

Comments

@danielpeintner
Copy link
Member

danielpeintner commented Jul 12, 2018

A recent update related to coap-binding seems to require Node.js 10 to successfully run npm run bootstrap...

With version 8 I get lots of issues (e.g. also related to #10) while with Node.js 10 everything seems to work fine again.

  1. I am not sure if it is already the time to switch
  2. There are more issues with binding-websockets package
    node_modules/@types/ws/index.d.ts(179,24): error TS2694: Namespace '"net"' has no exported member 'AddressInfo'.
    Adding the following to ws.ts for example does the trick
    declare module 'net' {export interface AddressInfo {} }
  3. TODO (we need to setup Travis again to avoid/notice such issues in the future)
@mkovatsc
Copy link
Contributor

The AddressInfo bug came from @types/ws: DefinitelyTyped/DefinitelyTyped#25890
It is fixed in 5.1.2, which is now the dependency for node-wot (5e68104).

@mkovatsc
Copy link
Contributor

NodeJS 10.* does not need the crypto polyfill (see https://github.com/AlCalzone/node-dtls-client/blob/master/install/postinstall.js), so no local compilation is needed then.

For versions < 10.* it should still work properly, given the prerequisites for node-gyp: https://github.com/nodejs/node-gyp#installation -- which is covered on Windows with the buildtools:

  • Python 2.7
  • make
  • GCC

I will add this to the README for Linux and MacOS.

@danielpeintner
Copy link
Member Author

The recent updates resolved the afore mentioned issues for node v10.

Running npm install -g --production windows-build-tools in CMD shell as administrator, as described in https://github.com/eclipse/thingweb.node-wot#windows, did NOT work for me with node v8.

Maybe an issue on my machine/installation. Do others experience the same issue?

> node-aead-crypto@1.1.3 install:default D:\Projects\WoT\thingweb\thingweb.node-
wot\packages\binding-coap\node_modules\node-dtls-client\node_modules\node-aead-c
rypto
> node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
D:\Projects\WoT\thingweb\thingweb.node-wot\packages\binding-coap\node_modules\no
de-dtls-client\node_modules\node-aead-crypto\build\node_aead_crypto.vcxproj(20,3
): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not
found. Confirm that the path in the <Import> declaration is correct, and that th
e file exists on disk.
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\mchn4310\AppData\Ro
aming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallbac
k-to-build --module=D:\Projects\WoT\thingweb\thingweb.node-wot\packages\binding-
coap\node_modules\node-dtls-client\node_modules\node-aead-crypto\build\Release\n
ode-v57-win32-x64\node_aead_crypto.node --module_name=node_aead_crypto --module_
path=D:\Projects\WoT\thingweb\thingweb.node-wot\packages\binding-coap\node_modul
es\node-dtls-client\node_modules\node-aead-crypto\build\Release\node-v57-win32-x
64 --napi_version=3 --node_abi_napi=napi' (1)

    at Promise.all.then.arr (D:\Projects\WoT\thingweb\thingweb.node-wot\node_mod
ules\lerna\node_modules\execa\index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 1,
  killed: false,
  stdout: '\n> node-dtls-client@0.5.4 install D:\\Projects\\WoT\\thingweb\\thing
web.node-wot\\packages\\binding-coap\\node_modules\\node-dtls-client\n> node ins
tall/postinstall.js\n\nnode-dtls-client: testing NodeJS version\n  Version < 10,
 installing node-aead-crypto...\n\n> node-aead-crypto@1.1.3 install D:\\Projects
\\WoT\\thingweb\\thingweb.node-wot\\packages\\binding-coap\\node_modules\\node-d
tls-client\\node_modules\\node-aead-crypto\n> node lib/install.js\n\nrunning def
ault installation script\n\n> node-aead-crypto@1.1.3 install:default D:\\Project
s\\WoT\\thingweb\\thingweb.node-wot\\packages\\binding-coap\\node_modules\\node-
dtls-client\\node_modules\\node-aead-crypto\n> node-pre-gyp install --fallback-t
o-build\n\nBuilding the projects in this solution one at a time. To enable paral
lel build, please add the "/m" switch.\r\nD:\\Projects\\WoT\\thingweb\\thingweb.
node-wot\\packages\\binding-coap\\node_modules\\node-dtls-client\\node_modules\\
node-aead-crypto\\build\\node_aead_crypto.vcxproj(20,3): error MSB4019: The impo
...

For the last issue about Travis I opened another issue (see #22).

@mkovatsc
Copy link
Contributor

Works for me on the "good" old Windows 7.

I remember an issue with the free Visual Studio compilers for Windows 10 and the need to manually install a specific version.

Which Windows and for 10 which build do you have?

@danielpeintner
Copy link
Member Author

I am on Windows7 too.

Anyhow, node10 works... might really an issue n my side and I think we can close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants