Daniel Chen
Daniel Chen
> Try with #1744 Hi Roberts, thanks for your reply! I tried to put below code into pkg setting ``` "patches": { "node_modules/ffi-napi/lib/dynamic_library.js": [ "this._path = path;", "if (path.startsWith('/snapshot/')) {...
@robertsLando I also printed the path, and got ``` msvcrt.dll C:\snapshot\dc\Desktop\AOS\iba-server\node_modules\rticonnextdds-connector\rticonnextdds-connector\lib\win-x64\msvcr120.dll C:\snapshot\dc\Desktop\AOS\iba-server\node_modules\rticonnextdds-connector\rticonnextdds-connector\lib\win-x64\nddscore.dll ``` the last two can be found in that path, while the first one is missing. Do you...
@robertsLando do you know how to fix it? :)
@robertsLando actually I found I never enter into the `if (path.startsWith("/snapshot/"))` in below.... ``` if (path.startsWith("/snapshot/")) { const Fs = require("fs"); const moduleContent = Fs.readFileSync(path); const hash = require("crypto").createHash("sha256").update(moduleContent).digest("hex"); const...
@robertsLando by removing `if (path.startsWith("/snapshot/")) {}`, it works...
> So fixed? not 100%, instead of doing `if(path.startsWith("/snapshot/"))`, I do `if(path.includes("snapshot"))`. I know it is not strict, but it works for my case... still don't know why startWith not...
@robertsLando thanks for your help! there is one more issue. After I package it for linux from my windows pc, I run this file from ubuntu and I got another...
> ``` > "node_modules/ffi-napi/lib/dynamic_library.js": [ > "this._path = path;", > "if(path.includes('snapshot')) {const Fs = require('fs'); const moduleContent = Fs.readFileSync(path); const hash = require('crypto').createHash('sha256').update(moduleContent).digest('hex'); const Path = require('path'); const tmpFolder =...
@robertsLando hello there, would you please help me have a look? many thanks. :)
@robertsLando Hi, I made some progress on linux build. I found after run `pkg .` , I did create tmp folder for those native addons. However, two files are missing,...