This is a
Simply install by running npm install -g nexe, and try to run nexe my-node-app.js gives me this error message:
/usr/local/lib/node_modules/nexe/node_modules/fuse-box/Utils.js:68
function uglify(contents, { es6 = false, ...opts } = {}) {
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/nexe/node_modules/fuse-box/CacheBreaker.js:5:17)
✔ nexe 2.0.0-rc.24
✔ Finished in 0.012s
(node:1942) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): SyntaxError: Unexpected token ...
(node:1942) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Oh Shoot! Looks like fuse-box introduced a > node 8 requirement.
Any update on this?
I've been trying to work out how I can install Node 8 separately, and use this purely for NEXE to get round the problem.
Unfortunately I have to keep Node 7 as my default instance as I use Nodeclipse, which is not compliant with Node 8.
Being a bit of a newbie, I haven't worked that bit out yet, so any pointers would be helpful!!
Mark
Have you tried nvm? [https://davidwalsh.name/nvm]. Looks like it makes it easy to switch between Node versions.
Erik
This should work for anyone hitting this issue until it can be fixed:
https://github.com/nexe/nexe/issues/428#issuecomment-348553688
similar issue as #461
Most helpful comment
This should work for anyone hitting this issue until it can be fixed:
https://github.com/nexe/nexe/issues/428#issuecomment-348553688