Nexe: Building .exe is a success but running the exe throws error in fs module?

Created on 29 Sep 2017  路  4Comments  路  Source: nexe/nexe

This is a

  • [x] Bug Report
  • [ ] Feature Request
  • [ ] Other


When I run the console.application using the "npm start" command it works just fine.
And when I build the exe using the command "nexe -i fidlGen.js -o fidl-generator.exe" it builds fine.
but when I run the exe file I get the following error.
Please help me in this regards.
Thanks in advance.

Error Thrown:

fs.js:911
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir 'C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\lib'
    at Object.fs.readdirSync (fs.js:911:18)
    at Function.pkginfo.find (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:49921:18)
    at Function.pkginfo.read (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:49945:17)
    at module.exports (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:49895:21)
    at Number.<anonymous> (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:49958:1)
    at c (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:52824:3281)
    at w.require (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:52824:3065)
    at Number.<anonymous> (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:47914:1)
    at c (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:52824:3281)
    at w.require (C:\Users\Vickylance\Desktop\Projects\Nodejs\MAL-FIDL-generator\fidl-generator.exe:52824:3065)



The steps to reproduce?

I think the problem is in using the fs module.

My package.json file

{
  "name": "mal-fidl-generator",
  "version": "1.0.0",
  "description": "FIDL generation of MAL APIs from the API mapping XLS",
  "main": "fidlGenerator.js",
  "scripts": {
    "start": "node fidlGen.js",
    "test": "node -v"
  },
  "keywords": [
    "MAL",
    "FIDL",
    "generator",
    "API",
    "XLS",
    "mapping"
  ],
  "author": "Prasanna",
  "license": "ISC",
  "dependencies": {
    "prompt": "^1.0.0",
    "xls-to-json-lc": "^0.3.4",
    "xlsx": "^0.11.4",
    "xlsx-to-json-lc": "^0.5.0"
  }
}

Please also provide:

  • Platform(OS/Version): Windows 10 64-Bit
  • Host Node Version: v8.6.0
  • Target Node Version: v8.6.0
  • Nexe version: 2.0.0-rc.6
  • Python Version: v2.7.14

Most helpful comment

Glad it worked.
You can also use a slightly more terse command nexe fidlGen.js -o fidl-generator to the same effect

All 4 comments

pkginfo doesn't play well with bundling. It has been removed from prompt. You can install from github or follow up on this issue. https://github.com/flatiron/prompt/issues/183

@calebboyd Awesome thanks 馃憤 it worked.

I uninstalled the installed version of prompt using the code below.
npm uninstall --save prompt

And then I reinstalled the prompt using the latest git commit from the prompt github repo using the below command.
npm i --save https://github.com/flatiron/prompt.git

And then I rebundled the exe using the below command.
nexe -i fidlGen.js -o fidl-generator.exe

And it worked flawlessly :D

Glad it worked.
You can also use a slightly more terse command nexe fidlGen.js -o fidl-generator to the same effect

Hello. Similiar problem here.
Problem appears only when I start application from MacOS Finder. Everything works fine when starting it from terminal.

/Users/me/PhpstormProjects/nexetest/nexetest ; exit;
fs.js:904
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir 'scan'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.<anonymous> (/Users/me/PhpstormProjects/nexetest/nexetest:21:18)
    at c (/Users/me/PhpstormProjects/nexetest/nexetest:23476:3565)
    at Function.r.import (/Users/me/PhpstormProjects/nexetest/nexetest:23476:4171)
    at p (/Users/me/PhpstormProjects/nexetest/nexetest:23473:15)
    at Object.<anonymous> (/Users/me/PhpstormProjects/nexetest/nexetest:23476:1)
    at Module._compile (module.js:652:30)
    at _third_party_main.js:45:20
    at NativeModule.compile (bootstrap_node.js:597:7)
    at Function.NativeModule.require (bootstrap_node.js:542:18)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

transitive-bullshit picture transitive-bullshit  路  6Comments

frederikhors picture frederikhors  路  3Comments

nfrasser picture nfrasser  路  6Comments

sascha-schieferdecker picture sascha-schieferdecker  路  4Comments

affanshahid picture affanshahid  路  3Comments