Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Napa.js Configuration for Visual Studio Code Extensions #247

Open
ricardoferreirasilva opened this issue Jun 18, 2018 · 3 comments
Open

Comments

@ricardoferreirasilva
Copy link

Greetings,

I am currently developing an extension for visual studio code and would like to take advantage of napajs in order to do some heavy processing. I tried following standard installation but I got this error:

Error: Module did not self-register. at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20) at Object.Module._extensions..node (module.js:598:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object.<anonymous> (c:\Users\Ricardo da Silva\Documents\Ludus\AgeVSCode\age-languageServer\client\server\node_modules\napajs\lib\binding.js:24:22) at Object.<anonymous> (c:\Users\Ricardo da Silva\Documents\Ludus\AgeVSCode\age-languageServer\client\server\node_modules\napajs\lib\binding.js:29:3)

I assume this has something to do with the fact that Visual Studio Code runs over Electron. I wonder if there are any plans to add VSCODE as a pre-configured enviroment or if someone has sucessfully managed to make a configuration to make it run.

@fs-eire
Copy link
Contributor

fs-eire commented Jun 18, 2018

greetings @tansvanio could you please let me know the node version and napa version that you are using?

@ricardoferreirasilva
Copy link
Author

@fs-eire Node version: v8.11.3 Napa version: 0.2.3

@fs-eire
Copy link
Contributor

fs-eire commented Jun 18, 2018

I haven't developed vscode extension before. I guess this error is because of node module version. Basicly Node requires an addon to be built upon the same NODE_MODULE_VERSION. Electron uses a unique NODE_MODULE_VERSION so a rebuild is required (see https://github.com/Microsoft/napajs/wiki/Build-Napa.js-for-Electron)

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

No branches or pull requests

2 participants