igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

unable to install on FreeBSD, failure to detect x86 architecture #109

Closed cuteboi closed 7 years ago

cuteboi commented 8 years ago

Was there any plan to support it? I will assume no.

function getSuffix(arch) {
  return {
    win32: {
      x86: "win32",
      x64: "win64"
    },
    linux: {
      x86: "linux-x86",
      x64: "linux-x64",
      armv6: "linux-armv6",
      armv7: "linux-armv7"
    },
    darwin: {
      x86: "darwin-x86",
      x64: "darwin-x64"
    }
  }[process.platform][arch];
}

Error messages

root@freebsd_builder:~ # npm bugs enclose
npm ERR! FreeBSD 10.3-RELEASE
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "bugs" "enclose"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.2
npm ERR! path xdg-open
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn xdg-open

npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log
/usr/local/bin/enclose -> /usr/local/lib/node_modules/enclose/bin/enclose.js

> enclose@2.1.0 postinstall /usr/local/lib/node_modules/enclose
> node postinstall.js

/usr/local/lib/node_modules/enclose/bin/enclose.js:44
  }[process.platform][arch];
                     ^

TypeError: Cannot read property 'x86' of undefined
    at getSuffix (/usr/local/lib/node_modules/enclose/bin/enclose.js:44:22)
    at Array.map (native)
    at Object.downloads (/usr/local/lib/node_modules/enclose/bin/enclose.js:261:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/enclose/postinstall.js:18:25)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
npm ERR! FreeBSD 10.3-RELEASE
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "enclose"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.2
npm ERR! code ELIFECYCLE

npm ERR! enclose@2.1.0 postinstall: `node postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the enclose@2.1.0 postinstall script 'node postinstall.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the enclose package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs enclose
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls enclose
npm ERR! There is likely additional logging output above.
root@freebsd_builder:~ # cat npm-debug.log 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'bugs', 'enclose' ]
2 info using npm@3.9.2
3 info using node@v6.2.2
4 verbose config Skipping project config: /root/.npmrc. (matches userconfig)
5 silly fetchPackageMetaData enclose
6 silly fetchNamedPackageData enclose
7 silly mapToRegistry name enclose
8 silly mapToRegistry using default registry
9 silly mapToRegistry registry https://registry.npmjs.org/
10 silly mapToRegistry data Result {
10 silly mapToRegistry   raw: 'enclose',
10 silly mapToRegistry   scope: null,
10 silly mapToRegistry   name: 'enclose',
10 silly mapToRegistry   rawSpec: '',
10 silly mapToRegistry   spec: 'latest',
10 silly mapToRegistry   type: 'tag' }
11 silly mapToRegistry uri https://registry.npmjs.org/enclose
12 verbose request uri https://registry.npmjs.org/enclose
13 verbose request no auth needed
14 info attempt registry request try #1 at 9:51:15 PM
15 verbose request id 749312ba244831e1
16 verbose etag "6I2LAHE5HB88ZUYU5ZSJ9KPQV"
17 http request GET https://registry.npmjs.org/enclose
18 http 304 https://registry.npmjs.org/enclose
19 verbose headers { date: 'Tue, 12 Jul 2016 02:51:31 GMT',
19 verbose headers   via: '1.1 varnish',
19 verbose headers   'cache-control': 'max-age=300',
19 verbose headers   etag: '"6I2LAHE5HB88ZUYU5ZSJ9KPQV"',
19 verbose headers   age: '137',
19 verbose headers   connection: 'keep-alive',
19 verbose headers   'x-served-by': 'cache-ord1720-ORD',
19 verbose headers   'x-cache': 'HIT',
19 verbose headers   'x-cache-hits': '1',
19 verbose headers   'x-timer': 'S1468291891.259371,VS0,VE0',
19 verbose headers   vary: 'Accept-Encoding' }
20 silly get cb [ 304,
20 silly get   { date: 'Tue, 12 Jul 2016 02:51:31 GMT',
20 silly get     via: '1.1 varnish',
20 silly get     'cache-control': 'max-age=300',
20 silly get     etag: '"6I2LAHE5HB88ZUYU5ZSJ9KPQV"',
20 silly get     age: '137',
20 silly get     connection: 'keep-alive',
20 silly get     'x-served-by': 'cache-ord1720-ORD',
20 silly get     'x-cache': 'HIT',
20 silly get     'x-cache-hits': '1',
20 silly get     'x-timer': 'S1468291891.259371,VS0,VE0',
20 silly get     vary: 'Accept-Encoding' } ]
21 verbose etag https://registry.npmjs.org/enclose from cache
22 verbose get saving enclose to /root/.npm/registry.npmjs.org/enclose/.cache.json
23 verbose correctMkdir /root/.npm correctMkdir not in flight; initializing
24 silly bugs url https://github.com/igorklopov/enclose/issues
25 verbose stack Error: spawn xdg-open ENOENT
25 verbose stack     at exports._errnoException (util.js:1007:11)
25 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
25 verbose stack     at onErrorNT (internal/child_process.js:348:16)
25 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:74:11)
25 verbose stack     at process._tickCallback (internal/process/next_tick.js:98:9)
26 verbose cwd /root
27 error FreeBSD 10.3-RELEASE
28 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "bugs" "enclose"
29 error node v6.2.2
30 error npm  v3.9.2
31 error path xdg-open
32 error code ENOENT
33 error errno ENOENT
34 error syscall spawn xdg-open
35 error enoent spawn xdg-open ENOENT
36 error enoent spawn xdg-open ENOENT
36 error enoent This is most likely not a problem with npm itself
36 error enoent and is related to npm not being able to find a file.
37 verbose exit [ 1, true ]
root@freebsd_builder:~ # uname -a
FreeBSD freebsd_builder 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
igorklopov commented 8 years ago

Hi. EncloseJS does not support FreeBSD. In your case postinstall script fails to download binaries for FreeBSD. Please give me a day or two - i will try to build.

cuteboi commented 8 years ago

Thanks for the quick response.

cuteboi commented 8 years ago

So, any update on this?

marian-toaderr commented 8 years ago

I'm also facing the same issue now. Is there any way of solving it?

marian-toaderr commented 8 years ago

I would had expected an answer by now. I think that is a really great project, but with this kind of support, I'm really disapointed.

cuteboi commented 8 years ago

I never expect support on an open source and free project. It's not a paid product, and with that said, I don't expect a response for months on end. I'll either get approved to spend time to work on the project and add I support for FreeBSD, or leave it behind. So far I'm using a different project to build the binary, and it has limitations, but within spec of my personal project and time.

I'll just ping back here every couple of weeks, so it kind of bubbles up as an open issue.

On Sep 28, 2016 4:16 PM, "Toader Marian" notifications@github.com wrote:

I would had expected an answer by now. I think that is a really great project, but with this kind of support, I'm really disapointed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/igorklopov/enclose/issues/109#issuecomment-250303295, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFioHm9aOTVM3XUq74T6B9wBdCRyvb5ks5qutlDgaJpZM4JJ_Yq .

igorklopov commented 7 years ago

Dear users of EncloseJS! I highly encourage you to switch to https://github.com/zeit/pkg It is rewritten successor of EncloseJS. It is open source, and all improvements will go there. Please check if pkg has your issue unresolved, and if it is true, reopen your issue there: https://github.com/zeit/pkg/issues