fwon / electron-anyproxy Goto Github PK
View Code? Open in Web Editor NEW📢 A http/https proxy client, using to analyze and mock.
License: MIT License
📢 A http/https proxy client, using to analyze and mock.
License: MIT License
问题:
CSS的background url无法正确引入
出现场景:
mainWindow.loadURL(`file://${__dirname}/client/index.html`);
临时解决:
采取 electron/issues/4612 中的方法。
mac:在根目录下直接install失败
nodejs: v10.15.3
npm:v10.15.3
=====npm install 日志==============
14025 silly saveTree ├── [email protected]
14025 silly saveTree └── [email protected]
14026 verbose stack Error: [email protected] postinstall: node install.js
14026 verbose stack Exit status 1
14026 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
14026 verbose stack at EventEmitter.emit (events.js:189:13)
14026 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14026 verbose stack at ChildProcess.emit (events.js:189:13)
14026 verbose stack at maybeClose (internal/child_process.js:970:16)
14026 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14027 verbose pkgid [email protected]
14028 verbose cwd /Users/finup/Desktop/work/dev/electron-anyproxy
14029 verbose Darwin 18.7.0
14030 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
14031 verbose node v10.15.3
14032 verbose npm v6.11.2
14033 error code ELIFECYCLE
14034 error errno 1
14035 error [email protected] postinstall: node install.js
14035 error Exit status 1
14036 error Failed at the [email protected] postinstall script.
14036 error This is probably not a problem with npm. There is likely additional logging output above.
14037 verbose exit [ 1, true ]
➜ electron-anyproxy git:(master) ✗ sudo npm run pack
[email protected] pack /Users/liwei/Applications/github/electron-anyproxy
electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns
Packaging app for platform darwin x64 using electron v1.6.4
ENAMETOOLONG: name too long, unlink '/Users/liwei/Applications/github/electron-anyproxy/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Resources/app/electron-packager/darwin-x64/Anyproxy-darwin-x64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework'
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "pack"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] pack: electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pack script 'electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=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 electron-anyproxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-anyproxy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-anyproxy
npm ERR! There is likely additional logging output above.
Uncaught Exception:
Error: listen EADDRINUSE :::8001
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server._listen2 (net.js:1262:14)
at listen (net.js:1298:10)
at Server.listen (net.js:1376:9)
at /home/mikow/electron-anyproxy-master/proxy.js:145:32
at /home/mikow/electron-anyproxy-master/node_modules/async/lib/async.js:607:21
at /home/mikow/electron-anyproxy-master/node_modules/async/lib/async.js:246:17
at iterate (/home/mikow/electron-anyproxy-master/node_modules/async/lib/async.js:146:13)
at /home/mikow/electron-anyproxy-master/node_modules/async/lib/async.js:157:25
npm run start 直接运行可以
打包出后功能没用 是什么情况
楼主在index.html中直接这么引入启动electron是有效的吗<script src="renderer.js"></script> <script src="./dist/build.js"></script>
异常详细信息如下:
info it worked if it ends with ok
verbose cli [ '/usr/local/Cellar/node/10.1.0/bin/node',
verbose cli '/usr/local/bin/npm',
verbose cli 'run',
verbose cli 'pack' ]
info using [email protected]
info using [email protected]
verbose run-script [ 'prepack', 'pack', 'postpack' ]
info lifecycle [email protected]prepack: [email protected]pack: [email protected]
info lifecycle [email protected]
verbose lifecycle [email protected]pack: unsafe-perm in lifecycle truepack: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mizone/electron-anyproxy-master/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS
verbose lifecycle [email protected]
verbose lifecycle [email protected]pack: CWD: /mizone/electron-anyproxy-masterpack: Args: [ '-c',
silly lifecycle [email protected]
silly lifecycle 'electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns' ]
silly lifecycle [email protected]pack: Returned: code: 1 signal: nullpack: Failed to exec pack script
info lifecycle [email protected]
verbose stack Error: [email protected] pack: electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns
verbose stack Exit status 1
verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
verbose stack at EventEmitter.emit (events.js:182:13)
verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
verbose stack at ChildProcess.emit (events.js:182:13)
verbose stack at maybeClose (internal/child_process.js:957:16)
verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
verbose pkgid [email protected]
verbose cwd /mizone/electron-anyproxy-master
verbose Darwin 17.5.0
verbose argv "/usr/local/Cellar/node/10.1.0/bin/node" "/usr/local/bin/npm" "run" "pack"
verbose node v10.1.0
verbose npm v5.6.0
error code ELIFECYCLE
error errno 1
error [email protected] pack: electron-packager . Anyproxy --out=pack --overwrite --ignore=client/node_modules --icon=icon.icns
error Exit status 1
error Failed at the [email protected] pack script.
error This is probably not a problem with npm. There is likely additional logging output above.
verbose exit [ 1, true ]
请问如何解决?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.