Electronic packer returns error - command failed npm prune --production

my electronic packer returns an error.

That was my team.

electron-packager ./packager angular-test --platform=win32 --arch=ia32 

Error getting iam below:

 Packaging app for platform win32 ia32 using electron v1.4.13 Command failed: npm prune --production npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "prune" "--production" npm ERR! node v6.2.2 npm ERR! npm v3.9.5 npm ERR! path C:\Users\dell\AppData\Local\Temp\electron-packager\win32-ia32\angular-test-win32-ia32\resources\app\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\dell\AppData\Local\Temp\electron-packager\win32-ia32\angular-test-win32-ia32\resources\app\package.json' npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\dell\AppData\Local\Temp\electron-packager\win32-ia32\angular-test-win32-ia32\resources\app\package.json' 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! C:\Users\dell\AppData\Local\Temp\electron-packager\win32-ia32\angular-test-win32-ia32\resources\app\npm-debug.log 

Does anyone have an idea of ​​what's wrong?

+6
source share
1 answer

You need to have a package.json file in your ./packager directory. This is the required file for Electron-packager, which can pack your application. An example package.json file can be found here or for quick reference:

 { "name" : "your-app", "version" : "0.1.0", "main" : "main.js" } 
+2
source

Source: https://habr.com/ru/post/1013670/


All Articles