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

Not so easy to use in VSCode or Electron #94

Closed
Mabenan opened this issue Jul 24, 2019 · 3 comments
Closed

Not so easy to use in VSCode or Electron #94

Mabenan opened this issue Jul 24, 2019 · 3 comments

Comments

@Mabenan
Copy link

Mabenan commented Jul 24, 2019

Hi,

after a day of screaming i finally found the reason why this module doesn't run out of the box with VSCode. The Reason here is that it has to be build with node_module_version 69 or higher. That maybe sounds easy but the problem here is that there is no Node Version with this ABI Version the reason for this can be found here nodejs/TSC#651.

So the easy solution seams to be to compile against ABI Version 72 which is Node Version 12.6.0. This works fine but if you try it the following way

npm install node-rfc@v1.0.0-rc10 --build-from-source

It generates the binding folders with the ABI version. Which results in the folder
win32-x64-node-v72

This folder won't be found at runtime because the module loader searches for the folder
win32-x64-node-v72

A solution for this could be to still generate the folders with version but also generate a folder that doesn't have a version and can be use as fallback in sapnwrfc-client.ts

@bsrdjan
Copy link
Member

bsrdjan commented Jul 24, 2019

Could you please explain what is exactly not running out of the box, because VSCode users (including me) did not report the issue so far? Also the folder name win32-x64-node-v72 is identical in comment below:

It generates the binding folders with the ABI version. Which results in the folder
win32-x64-node-v72

This folder won't be found at runtime because the module loader searches for the folder
win32-x64-node-v72

The node-rfc is built for LTS releases and their corresponding ABI versions. The latest node-rfc release includes the v72 binaries as well, what is exactly missing?

@Mabenan
Copy link
Author

Mabenan commented Jul 24, 2019

Sorry, it should have been that way.

It generates the binding folders with the ABI version. Which results in the folder
win32-x64-node-v72

This folder won't be found at runtime because the module loader searches for the folder
win32-x64-node-v69

The concrete error is when i want to use the node-rfc lib in an vscode extension. This is because VSCode uses his own node processor.

When i change the v72 manually into v69 it works perfectly fine.
It also works with the pull request.

@bsrdjan
Copy link
Member

bsrdjan commented Jul 26, 2019

I would not merge the workaround into node-rfc, for fixing (hopefully temporary) gap in Electron vs-code extension. Thank you very much for the pull request helping other Electron extension users fix the issue.

@bsrdjan bsrdjan closed this as completed Jul 30, 2019
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