2016-12-31 53 views
6

我的電子包裝器返回一個錯誤。電子包裝器返回一個錯誤 - 命令失敗npm prune --production

,這是我的命令

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

錯誤IAM越來越低於:

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 

人有什麼是錯的想法?

+0

它與angular2電子應用只發生。其餘的電子應用程序工作正常, – Jay

回答

2

您需要在./packager目錄中有一個package.json文件。這是Electron-packager能夠打包您的應用程序的必需文件。一個例子的package.json文件可以發現here或爲快速參考:

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

它在那裏。無論如何感謝回覆 – Jay

相關問題