nodegui: The specified module could not be found
Describe the bug When running the example/starter code for nodegui, I get the error:
internal/modules/cjs/loader.js:1226
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\\?\C:\Users\Max\Documents\stuff of max\node.js stuff\d-and-d-spells-database\node_modules\@nodegui\nodegui\build\Release\nodegui_core.node
[90m at Object.Module._extensions..node (internal/modules/cjs/loader.js:1226:18)[39m
[90m at Module.load (internal/modules/cjs/loader.js:1040:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:929:14)[39m
[90m at Module.require (internal/modules/cjs/loader.js:1080:19)[39m
[90m at require (internal/modules/cjs/helpers.js:72:18)[39m
at Object.<anonymous> (C:\Users\Max\Documents\stuff of max\node.js stuff\d-and-d-spells-database\node_modules\[4m@nodegui[24m\nodegui\dist\lib\utils\addon.js:3:15)
[90m at Module._compile (internal/modules/cjs/loader.js:1176:30)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:1040:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:929:14)[39m
The code I’m using (in a file called index.js
):
const { QMainWindow } = require("@nodegui/nodegui");
const win = new QMainWindow();
win.show();
global.win = win; // To prevent win from being garbage collected.
I run it with qode index.js
. Maybe because it was compiled with the wrong version of npm or something?? I have no idea. Please help me. Thanks.
Desktop :
- OS: Windows 10
- NodeGUI version: the latest I guess, installed it with
npm install @nodegui/nodegui
- NPM version:
6.14.5
- Node version:
12.13.1
- Qode version:
14.2.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16
Huh ok. I created an npm script called
start
that just runs the commandqode index.js
. The app opens and everything works. I’m very confused. Why would this have any effect on the problem?#937 This may be helpful to someone.