This is a
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:
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)
Most helpful comment
Glad it worked.
You can also use a slightly more terse command
nexe fidlGen.js -o fidl-generatorto the same effect