Warning Failed to make bytecode for file
See original GitHub issueTrying to package an app with just --targets node8.6.0-win-x86
in linux. Get dozens of warnings:
Warning Failed to make bytecode for file C:\snapshot\app\index.js error (spawn /home/travis/.pkg-cache/v2.3/fetched-v8.6.0-linux-x86 ENOENT)
.
The resulting app doesn’t work on Windows.
If i enable --no-bytecode
, I get:
Error! --no-bytecode and no source breaks final executable /home/travis/build/app/index.js Please run with “-d” and without “–no-bytecode” first, and make sure that debug log does not contain “was included as bytecode”.
With the option disabled and -d
enabled I get around one hundred lines with [debug] The file was included as bytecode (no sources)
in the logs.
If I launch the same packaging process in macOS, it works fine.
Both pkg@4.2.6
or pkg@4.3.0-beta.5
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:19
I experienced the same issue on GitLab CI. But I was able to build them locally. The solution was to include support for 32-bit executables.
I’m using the
node:7
image on GitLab CI as build image. The runners are on a 64-bit host. When debugging locally usingdocker run -it -v $PWD:/root/vdds-client node:7 /bin/bash
I found out that I had the same issue as on the CI: no proper win-x86 output.Using the
-d
flag forpkg
I saw the following section:When trying to run the
/root/.pkg-cache/v2.5/fetched-v6.11.5-linux-x86
it gave me the following error:So I took a look:
This triggered the idea that I did include the
i386
support locally…So I was able to fix it for my case (gitlab-ci, node:7 image) by installing glibc with i386 support by adding the following to the
.gitlab-ci.yml
script
section:You might need to adapt for your setup;-) Installing
ia32-libs
instead of multiarch could be also a way, don’t know about non-Debian systems…@zeit If you can let us know where to start looking into this issue, I’d be very much happy to help fix this.