[GH-ISSUE #179] Module could not be found #114

Closed
opened 2026-05-05 11:44:03 -06:00 by gitea-mirror · 17 comments
Owner

Originally created by @ateshuseyin on GitHub (Sep 28, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/179

I cannot start any proton app at win10. my nodejs version is v8.12.0.

puro@0.0.1 start C:\Users\IEUser\Projects\puro
babel-node index.js

module.js:682
return process.dlopen(module, path._makeLong(filename));
^

Error: The specified module could not be found.
\?\C:\Users\IEUser\Projects\puro\node_modules\libui-node\nbind.node
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at initNode (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:141:15)
at C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:115:13
at findCompiledModule (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:79:13)
at find (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:93:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puro@0.0.1 start: babel-node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puro@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\IEUser\AppData\Roaming\npm-cache_logs\2018-09-28T13_10_18_962Z-debug.log

Originally created by @ateshuseyin on GitHub (Sep 28, 2018). Original GitHub issue: https://github.com/kusti8/proton-native/issues/179 I cannot start any proton app at win10. my nodejs version is v8.12.0. > puro@0.0.1 start C:\Users\IEUser\Projects\puro > babel-node index.js module.js:682 return process.dlopen(module, path._makeLong(filename)); ^ Error: The specified module could not be found. \\?\C:\Users\IEUser\Projects\puro\node_modules\libui-node\nbind.node at Object.Module._extensions..node (module.js:682:18) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at initNode (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:141:15) at C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:115:13 at findCompiledModule (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:79:13) at find (C:\Users\IEUser\Projects\puro\node_modules\nbind\dist\nbind.js:93:13) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! puro@0.0.1 start: `babel-node index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puro@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\IEUser\AppData\Roaming\npm-cache\_logs\2018-09-28T13_10_18_962Z-debug.log
Author
Owner

@mischnic commented on GitHub (Sep 28, 2018):

I don't know how this happend, but please try deleting your node_modules folder and rerunning npm install.

<!-- gh-comment-id:425431744 --> @mischnic commented on GitHub (Sep 28, 2018): I don't know how this happend, but please try deleting your node_modules folder and rerunning `npm install`.
Author
Owner

@ateshuseyin commented on GitHub (Sep 28, 2018):

I tried deleting node_modules on win8.1 and win10 with 32-bit/64-bit node 8 and 10. But nothing is changed.

<!-- gh-comment-id:425470029 --> @ateshuseyin commented on GitHub (Sep 28, 2018): I tried deleting node_modules on win8.1 and win10 with 32-bit/64-bit node 8 and 10. But nothing is changed.
Author
Owner

@mischnic commented on GitHub (Sep 28, 2018):

Does the file C:\Users\IEUser\Projects\puro\node_modules\libui-node\nbind.node exist? In that directory, there should also be these files: libui.dll, libui.lib, ui.h.

@parro-it ?

<!-- gh-comment-id:425472002 --> @mischnic commented on GitHub (Sep 28, 2018): Does the file `C:\Users\IEUser\Projects\puro\node_modules\libui-node\nbind.node` exist? In that directory, there should also be these files: `libui.dll`, `libui.lib`, `ui.h`. @parro-it ?
Author
Owner

@ateshuseyin commented on GitHub (Sep 28, 2018):

Exacly. All of them is there. I opened nbind.node with dependencywalker. It says some of the dlls not found. But I am not sure if the reason is that. I installed windows-build-tools without an error.

<!-- gh-comment-id:425475995 --> @ateshuseyin commented on GitHub (Sep 28, 2018): Exacly. All of them is there. I opened nbind.node with dependencywalker. It says some of the dlls not found. But I am not sure if the reason is that. I installed windows-build-tools without an error.
Author
Owner

@parro-it commented on GitHub (Sep 28, 2018):

Which are the dll that dependencywalker cannot find?
Anyway, It seems all needed libui-node files are there, and on Windows there should not be other dependencies needed.

<!-- gh-comment-id:425488279 --> @parro-it commented on GitHub (Sep 28, 2018): Which are the dll that dependencywalker cannot find? Anyway, It seems all needed libui-node files are there, and on Windows there should not be other dependencies needed.
Author
Owner

@ateshuseyin commented on GitHub (Oct 1, 2018):

I reinstall whole my system. It works. I installed VS 2017 community, python2 then execute following commands:

npm config set python python2.7
npm config set msvs_version 2017

I think previously I installed python3.

<!-- gh-comment-id:426055531 --> @ateshuseyin commented on GitHub (Oct 1, 2018): I reinstall whole my system. It works. I installed VS 2017 community, python2 then execute following commands: ``` npm config set python python2.7 npm config set msvs_version 2017 ``` I think previously I installed python3.
Author
Owner

@falfiya commented on GitHub (Oct 1, 2018):

I'm getting the same issue. I've got windows-build-tools installed as per the quick start instructions. I'll try deleting my node_modules folder and running npm i again. Maybe it'll do something. I'm on Windows 10 x64 and I'm trying to run this through PowerShell.

<!-- gh-comment-id:426069593 --> @falfiya commented on GitHub (Oct 1, 2018): I'm getting the same issue. I've got `windows-build-tools` installed as per the quick start instructions. I'll try deleting my `node_modules` folder and running `npm i` again. Maybe it'll do something. I'm on Windows 10 x64 and I'm trying to run this through PowerShell.
Author
Owner

@falfiya commented on GitHub (Oct 1, 2018):

The issue persists.
Python: 2.7.15
Node: 10.11.0
npm: 6.4.1 (not that it should matter)
Output:

> my-win-app@0.0.1 start C:\Users\Alf\Desktop\my-win-app
> babel-node index.js

internal/modules/cjs/loader.js:718
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\Alf\Desktop\my-win-app\node_modules\libui-node\nbind.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at initNode (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:141:15)
    at C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:115:13
    at findCompiledModule (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:79:13)
    at find (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:93:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-win-app@0.0.1 start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-win-app@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Alf\AppData\Roaming\npm-cache\_logs\2018-10-01T21_35_51_570Z-debug.log
<!-- gh-comment-id:426071962 --> @falfiya commented on GitHub (Oct 1, 2018): The issue persists. Python: 2.7.15 Node: 10.11.0 npm: 6.4.1 (not that it should matter) Output: ``` > my-win-app@0.0.1 start C:\Users\Alf\Desktop\my-win-app > babel-node index.js internal/modules/cjs/loader.js:718 return process.dlopen(module, path.toNamespacedPath(filename)); ^ Error: The specified module could not be found. \\?\C:\Users\Alf\Desktop\my-win-app\node_modules\libui-node\nbind.node at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at initNode (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:141:15) at C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:115:13 at findCompiledModule (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:79:13) at find (C:\Users\Alf\Desktop\my-win-app\node_modules\nbind\dist\nbind.js:93:13) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! my-win-app@0.0.1 start: `babel-node index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the my-win-app@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alf\AppData\Roaming\npm-cache\_logs\2018-10-01T21_35_51_570Z-debug.log ```
Author
Owner

@ateshuseyin commented on GitHub (Oct 1, 2018):

Its about windows-build-tools. Install visual studio community instead of it. It works. Follow this https://github.com/nodejs/node-gyp#option-2

<!-- gh-comment-id:426081428 --> @ateshuseyin commented on GitHub (Oct 1, 2018): Its about windows-build-tools. Install visual studio community instead of it. It works. Follow this https://github.com/nodejs/node-gyp#option-2
Author
Owner

@falfiya commented on GitHub (Oct 3, 2018):

I'll give it a go.

<!-- gh-comment-id:426522855 --> @falfiya commented on GitHub (Oct 3, 2018): I'll give it a go.
Author
Owner

@develar commented on GitHub (Nov 13, 2018):

So strange that still proton-native doesn't provide prebuilt binaries and so no one can simply build proton-native app not only cross platform, but even on Windows... Yeach, someone should contribute :(

<!-- gh-comment-id:438330863 --> @develar commented on GitHub (Nov 13, 2018): So strange that still proton-native doesn't provide prebuilt binaries and so no one can simply build proton-native app not only cross platform, but even on Windows... Yeach, someone should contribute :(
Author
Owner

@mischnic commented on GitHub (Nov 13, 2018):

Prebuilt binaries for libui-node (the only native code within proton-native) will happen very soon!
Do you mean something like "cross-compilation" (so downloading the macOS binaries on Windows and creating a package)? How should the libui-node install script (which downloads the binaries) know which platform to choose in that case?

<!-- gh-comment-id:438334148 --> @mischnic commented on GitHub (Nov 13, 2018): Prebuilt binaries for libui-node (the only native code within proton-native) will happen very soon! Do you mean something like "cross-compilation" (so downloading the macOS binaries on Windows and creating a package)? How should the libui-node install script (which downloads the binaries) know which platform to choose in that case?
Author
Owner

@develar commented on GitHub (Nov 13, 2018):

How should the libui-node install script (which downloads the binaries) know which platform to choose in that case?

Like any other native module and exactly as it is currently implemented in electron-builder — there are 2 different tools — https://www.npmjs.com/package/prebuild (recommended, it is the best tool) and https://github.com/mapbox/node-pre-gyp (not recommended, not good).

See https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/util/yarn.ts#L33

In short, npm_config_platform / npm_config_arch and so on.

<!-- gh-comment-id:438338650 --> @develar commented on GitHub (Nov 13, 2018): > How should the libui-node install script (which downloads the binaries) know which platform to choose in that case? Like any other native module and exactly as it is currently implemented in electron-builder — there are 2 different tools — https://www.npmjs.com/package/prebuild (recommended, it is the best tool) and https://github.com/mapbox/node-pre-gyp (not recommended, not good). See https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/util/yarn.ts#L33 In short, `npm_config_platform` / `npm_config_arch ` and so on.
Author
Owner

@develar commented on GitHub (Nov 13, 2018):

update: cool, installing visual studio community is a workaround. I think this issue can be closed, Windows is known to be problematic and it is not libui node issue (about prebuild — https://github.com/parro-it/libui-node/issues/96)

<!-- gh-comment-id:438339955 --> @develar commented on GitHub (Nov 13, 2018): update: cool, installing visual studio community is a workaround. I think this issue can be closed, Windows is known to be problematic and it is not libui node issue (about prebuild — https://github.com/parro-it/libui-node/issues/96)
Author
Owner

@mischnic commented on GitHub (Nov 13, 2018):

@parro-it

<!-- gh-comment-id:438343900 --> @mischnic commented on GitHub (Nov 13, 2018): @parro-it
Author
Owner

@parro-it commented on GitHub (Dec 10, 2018):

@develar so if I correctly understand what @mischnic explain to me (with great patience 😁)
we would have to check that two environment vars and, at install time, download the prebuilt binaries for these platform/arch instead of the current ones?

<!-- gh-comment-id:445902268 --> @parro-it commented on GitHub (Dec 10, 2018): @develar so if I correctly understand what @mischnic explain to me (with great patience 😁) we would have to check that two environment vars and, at install time, download the prebuilt binaries for these platform/arch instead of the current ones?
Author
Owner

@kusti8 commented on GitHub (Jan 19, 2020):

Proton Native V2 is now released! If the issue still occurs in the new update, please open a new issue.

<!-- gh-comment-id:576029421 --> @kusti8 commented on GitHub (Jan 19, 2020): Proton Native V2 is now released! If the issue still occurs in the new update, please open a new issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#114
No description provided.