Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

site build results in a weird (possibly botched) file #25

Open
alfonsomunozpomer opened this issue Dec 28, 2020 · 4 comments
Open

site build results in a weird (possibly botched) file #25

alfonsomunozpomer opened this issue Dec 28, 2020 · 4 comments

Comments

@alfonsomunozpomer
Copy link
Contributor

alfonsomunozpomer commented Dec 28, 2020

I’m running Pop!_OS 20.10 and I’m using Node 12.16.2 (via nvm).

After running npm run build I get an executable site file in dist/release/linux/<date-time>/site as expected. However, inspecting the file I can see:

  • A first block in plain text format with things like:
version https://git-lfs.github.com/spec/v1
oid sha256:4f632bd3b3549a807252f0839ac6d3f878077fa07037501a4856c7225b9a8e0b
size 47231192
!(function () {process.__nexe = {"resources":...

The last line goes for very long

  • A few hundred lines of JS code preceded by a strict pragma, ending at module.exports = version
  • What looks like an ELF binary

See screenshots below.

image

image

image

Do I need to run update-nexe or run some other step to compile a proper binary?

@alfonsomunozpomer
Copy link
Contributor Author

Running update-nexe worked. I’ve noticed that at some point the build script downloads https://sitejs.org/nexe/linux-x64-12.16.2 if you haven’t got a local .nexe for the version of Node you’re using to build Site.js. I guess those binaries aren’t very portable. Let me know if I can provide you with any debugging info that may be useful.

@aral
Copy link
Contributor

aral commented Dec 28, 2020

Ah, sorry, I use the install-locally task myself when testing out binaries locally (which will pop the site binary in /usr/local/bin. Will have a look at what build does by itself (it’s been a while since I touched it). It should, at the very least, be clearer about what it does.

@alfonsomunozpomer
Copy link
Contributor Author

Fixed after running update-nexe. Feel free to close this issue.

@aral
Copy link
Contributor

aral commented Jan 4, 2021

Going to keep this open and look into it further as it should have worked for you. Will close after doing more testing with the latest Nexe after implementing support for it (Nexe 4 has just hit @latest).

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