ENOENT when electron-packager tries to package node_modules/.bin
See original GitHub issueHi all, when I try to use the electron-packager cli from the command line I get this error:
Packaging app for platform win32 x64 using electron v0.33.4
[ { [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/asar']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/asar' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/electron-download']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/electron-download' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/extract-zip']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/extract-zip' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/har-validator']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/har-validator' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/mkdirp']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/mkdirp' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/indent-string']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/indent-string' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/ncp']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/ncp' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/nugget']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/nugget' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/pretty-bytes']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/pretty-bytes' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/repeating']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/repeating' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/rimraf']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/rimraf' },
{ [Error: ENOENT: no such file or directory, stat '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/uuid']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/delvedor/Development/xxx/yyy/node_modules/.bin/uuid' } ] undefined
I’m using Node v4.1.1, npm v2.14.4 and electron-packager v5.1.0. My platform is MacOS 10.10 and I’m building for Windows, I get the same error if I launch the command inside Windows via Parallels. I read https://github.com/maxogden/electron-packager/issues/133, but the extract-zip@1.1.1 didn’t solve the problem.
I launch the command via npm-scripts:
"build:win": "electron-packager \"./\" \"software\" --out=\"buildOS/win\" --platform=\"win32\" --arch=\"x64\" --version=\"0.33.4\" --ignore=\"(buildOS|node_modules/electron-builder|jsES6|app/es6|pack.json|README.md)\" app-version=\"3.1.2\" --asar --icon=\"icon.ico\" --version-string.CompanyName=\"xxx\" --version-string.ProductName=\"software" --version-string.FileDescription=\"software\" --version-string.OriginalFilename=\"software\" --version-string.FileVersion=\"3.1.2\" --version-string.ProductVersion=\"3.1.2\" --version-string.LegalCopyright=\"© xxx\"",
If I do a grep of extract-zip I get this:
delvedor$ npm list | grep extract-zip
│ ├─┬ extract-zip@1.1.1
│ └─┬ extract-zip@1.1.1
Not sure, maybe similar to https://github.com/maxogden/electron-packager/issues/146?
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
SPAWN node ENOENT error in electron package on run
Now The node.js, express.js app in electron runs smoothly normally before packaging. The app does not run from the exe file after packaging....
Read more >electron-packager - npm
Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron ...
Read more >How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >Running Node Electron app gives ENOENT error in NixOS
I'm wondering if this ENOENT errors is the same file not found error as when running non-nix binaries that can not find lib...
Read more >Native Node Modules | Electron
Otherwise, you will get the following class of error when you try to run your app: Error: The module '/path/to/native/module.node'
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PierBover this is a different error than the original problem. Make sure wine exists in your PATH.
@muneebahmed26301 your
icon.ico
is not in the correct Windows ICO format.This problem is not related to this issue, if you need more assistance, please use one of the community forums.