pkg icon indicating copy to clipboard operation
pkg copied to clipboard

win10bug

Open hktalent opened this issue 8 years ago • 2 comments

win10

pkg mySocks5.js -o myapp.exe  --targets node9-win-x64
> [email protected]

is ok

test run myapp win7

C:\Users\Administrator\Desktop>myapp.exe
pkg/prelude/bootstrap.js:1172
      throw error;
      ^

Error: Cannot find module 'C:\snapshot\tmp1\node_modules\socksv5/lib/server'
1) If you want to compile the package/file into executable, please pay attention
 to compilation warnings and specify a literal in 'require' call. 2) If you don'
t want to compile the package/file into executable and want to 'require' it from
 filesystem (likely plugin), specify an absolute path in 'require' call using pr
ocess.cwd() or process.execPath.
    at Function.Module._resolveFilename (module.js:540:15)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1269:46)
    at Function.Module._load (module.js:470:25)
    at Module.require (module.js:583:17)
    at Module.require (pkg/prelude/bootstrap.js:1153:31)
    at require (internal/module.js:11:18)
    at C:\snapshot\tmp1\node_modules\socksv5\index.js:5:13
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (C:\snapshot\tmp1\node_modules\socksv5\index.js:4:32)
    at Module._compile (pkg/prelude/bootstrap.js:1243:22)

hktalent avatar Mar 26 '18 08:03 hktalent

For some reason pkg looks for modules under C:\snapshot\tmp1\node_modules\socksv5/lib/server, have you trie to pull myapp.exe under C:\snapshot path and copy modules to C:\snapshot\tmp1\node_modules\socksv5/lib/server ?

mikhail-manuilov avatar Apr 03 '18 09:04 mikhail-manuilov

hi @hktalent, did you find a solution for it? I'm having the same problem.

zohar1000 avatar May 08 '18 10:05 zohar1000