自己写了一个demo想打包可是总是失败于是从git上拉了项目什么都不动进行打包,可是还是报npm的错误以下是json文件 并且附上报错信息,求解决
{
"name": "sound_machine",
"version": "0.1.0",
"main": "./main.js",
"scripts": {
"start": "electron .",
"package": "electron-packager ./ SoundMachine --mac --out ~/Desktop/SoundMachine --version 0.30.2 --overwrite --icon=./app/img/app-icon.icns"
},
"devDependencies": {
"electron-packager": "^5.0.1",
"electron-prebuilt": "^0.30.3"
},
"dependencies": {
"nconf": "^0.7.2"
}
}
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "package"
npm ERR! node v6.4.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sound_machine@0.1.0 package: electron-packager ./ SoundMachine --mac --out ~/Desktop/SoundMachine --version 0.30.2 --overwrite --icon=./app/img/app-icon.icns
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sound_machine@0.1.0 package script 'electron-packager ./ SoundMachine --mac --out ~/Desktop/SoundMachine --version 0.30.2 --overwrite --icon=./app/img/app-icon.icns'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sound_machine package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron-packager ./ SoundMachine --mac --out ~/Desktop/SoundMachine --version 0.30.2 --overwrite --icon=./app/img/app-icon.icns
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sound_machine
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sound_machine
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/dongly/.npm/_logs/2017-02-15T07_03_52_813Z-debug.log
localhost:sound-machine-electron-guide dongly$
问题已经解决 Mac 下 打包要用到wine