Electronアプリを作成し、インストーラーの作成を行っています。
Electron builderでセットアップファイルを出力することはできたのですが、
Node moduleが省かれた状態でインストールされてしまいます。
htmlやcss、JavaScriptは問題なく読み込まれています。
以下のコマンドで作成していますが、なにかコマンドが足りないのでしょうか...
command
1electron-builder . test-win32-x64 --platform=win --arch=x64
package.jsonを作成して読み込む方法でも上手く行きません...
json
1{ 2 "name": "test", 3 "version": "0.1.0", 4 "description": "test", 5 "main": "server.js", 6 "scripts": { 7 "test": "echo \"Error: no test specified\" && exit 1", 8 "dev": "electron ./irohanote", 9 10 "pack:win": "electron-builder ./dist/test-win32-x64 --platform=win --arch=x64" 11 }, 12 "author": "", 13 "license": "BSD", 14 "dependencies": { 15 "electron": "^2.0.7", 16 "express": "^4.16.3", 17 "gulp": "^3.9.1", 18 "jquery": "^2.2.4" 19 }, 20 "build": { 21 "appId": "com.test.app", 22 "win": { 23 "target": "nsis", 24 "icon":"assets/Icon.ico" 25 } 26 } 27}
開発環境はWindowsになります。
/app/ (Electron アプリ)
|-- package.json
|-- main.js
|-- index.html
|-- node_modules
|-- etc...
/assets/ (アイコンファイル)
|-- icon.ico
/dist/ (パッケージングされたファイルを出力)
/package.json //これでnpm run pack:win
回答1件
あなたの回答
tips
プレビュー