Debian package built from sources: Error: Cannot find module '../build/Release/nslog.node'
DAC324 opened this issue · comments
Hello all,
when building a Debian package from the sources using
git clone https://github.com/atom-community/atom.git
cd atom
script/build --create-debian-package
the created Debian package installs successfully but atom
is unable to start:
$ /usr/share/atom-dev/atom
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '../build/Release/nslog.node'
Require stack:
- /usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js
- /usr/share/atom-dev/resources/app.asar/src/main-process/start.js
- /usr/share/atom-dev/resources/app.asar/src/main-process/main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:972:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:249:921)
at Module._load (internal/modules/cjs/loader.js:848:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js:5:11)
at Object.<anonymous> (/usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js:15:4)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
Apparently, node_modules/nslog
is not packaged properly in the ASAR package.
The folder /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/nslog
is missing after installation of the compiled package; it is there after installation of the Debian binary package downloadable from Azure.
Update: It might help to clean up all compile caches under ~/.atom
.
Now I only have the problem that GLIBC-2.33
is not found in libglibc.so.6 on the Debian system I am testing on - but that's another story.
Building on a system with older Glibc should provide for the broadest compatibility.
Apps often require Glibc equal to or newer than ( >=
) the version they were built with.