Closed liangjiongyao closed 6 years ago
不需要进入script执行 在electron-wechat\执行 npm i npm run build:linux
我知道怎么回事了,我的bulid英文打错了。还有我想问一下,npm安装后,在应用菜单里面没有找到electron-wechat,我想做一个快捷方式,但是也不知道它的执行命令怎么写。我现在都是进入到/opt/electronic-wechat,然后执行npm start&,有没有更好的方法?
在build之后 electron-wechat/下应该有一个dist的文件夹 然后在/usr/share/applications创建一个electron-wechat.desktop文件,写入以下内容
[Desktop Entry]
Name=Electronic Wechat
Comment=Unofficial WeChat client built with React, MobX and Electron.
Exec=这里填dist文件夹下面的的可执行文件的绝对路径 %U
Terminal=false
Type=Application
Icon=找一个图标的绝对路径在项目的assets下面有
Categories=Chat;
太感谢了,我已经实现了
[root@localhost electronic-wechat]# ls assets CONTRIBUTING.md node_modules README.md CHANGELOG.md ISSUE_TEMPLATE.md package.json scripts config.json LICENSE.md README_en.md src [root@localhost electronic-wechat]# cd scripts/ [root@localhost scripts]# ls build-all.sh build.sh build-win32.bat qiniu.sh tar-all.sh [root@localhost scripts]# npm run bulid:linux npm ERR! missing script: bulid:linux
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-06-04T04_07_25_388Z-debug.log
[root@localhost electronic-wechat]# less /root/.npm/_logs/2018-06-04T04_05_52_833Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/opt/node-v10.2.0-linux-x64/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'run', 1 verbose cli 'bulid:linux' ] 2 info using npm@5.6.0 3 info using node@v10.2.0 4 verbose stack Error: missing script: bulid:linux 4 verbose stack at run (/opt/node-v10.2.0-linux-x64/lib/node_modules/npm/lib/run-script.js:151:19) ....... 报错好像是缺少脚本,求指导