urbdyn / nexe_builds

Cache of nexe binary builds for easy use!
MIT License
12 stars 7 forks source link

node-fibers require Node 14 despite of Node 12 project #3

Closed Kampflaus closed 3 years ago

Kampflaus commented 3 years ago

Hi there,

thanks for your efforts!

I tried building one of our apps with Node 12.21.0 and your Nexe prebuilt. It's an Meteor 2.1 app that uses 12.21.0 as well. Strangely, I get an error that a fibers bin for Node 14 is missing (win32-x64-83). I've only got the fibers bins for win32-x64-72 and win32-x64-64 after app building so where does that come from?

Any idea about that? Never had that before with 12.16.2 and older prebuilts from the Nexe github. But I'm not sure whether that error comes from the Nexe build.

Best Regards!

Here's the error log after starting my app (I replaced the entry path with xxx):

## There is an issue with node-fibers ##
xxx\dist\programs\server\node_modules\fibers\bin\win32-x64-83\fibers.node is missing.

Try running this to fix the issue: xxx\dist\ingest.exe xxx\dist\programs\server\node_modules\fibers/build
Error: Cannot find module 'xxx\dist\programs\server\node_modules\fibers\bin\win32-x64-83\fibers'
Require stack:
- xxx\dist\programs\server\node_modules\fibers\fibers.js
- xxx\dist\programs\server\boot.js
- xxx\dist\main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (xxx\dist\programs\server\node_modules\fibers\fibers.js:14:39)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Module.Mp._compile (xxx\dist\programs\server\runtime.js:50:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Module.Mp.load (xxx\dist\programs\server\runtime.js:15:31)
xxx\dist\programs\server\node_modules\fibers\fibers.js:23
                throw new Error('Missing binary. See message above.');
                ^

Error: Missing binary. See message above.
    at Object.<anonymous> (xxx\dist\programs\server\node_modules\fibers\fibers.js:23:9)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Module.Mp._compile (xxx\dist\programs\server\runtime.js:50:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Module.Mp.load (xxx\dist\programs\server\runtime.js:15:31)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (xxx\dist\programs\server\boot.js:2:15)
Kampflaus commented 3 years ago

I found out that this error isn't there, when I use the nexe --build instead of your remote build. Maybe that helps to narrow it down. Appreciating your work nevertheless.

code-ape commented 3 years ago

Apologies @Kampflaus on not following up here! Often such issues are from different versions of Node used to install the dependencies versus being targeted for the build with Nexe. If you use 12.21.0 make sure that's the version of node that's used when npm ci is run and that node_modules/ is deleted before hand. My guess it that the local node version was 14.x (i.e. NODE_MODULE_VERSION 83). I'm closing this for now. Let me know if you need it reopened!