V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
ChangHaoWei
V2EX  ›  Python

electron, zerorpc, vue.js ,分开我可能能玩,,和在一起我就不知道出现什么情况了。

  •  1
     
  •   ChangHaoWei · Jul 5, 2017 · 4089 views
    This topic created in 3220 days ago, the information mentioned may be changed or developed.

    首先我是想做一个 python 的 gui,但是 pyqt 太麻烦而且界面很丑。。

    看上了 electron,最近用的好多软件都基于它而且界面很好看。。

    python 和 elctron 的通讯使用的是 zerorpc。。这个也测通了 https://github.com/fyears/electron-python-example

    electron 和 vue.js 我用的是脚手架,https://github.com/SimulatedGREG/electron-vue

    现在问题来了。。我想 把三个合起来的时候出现了我不知道咋解决的问题。。

    Uncaught Error: The module '/Users/c/Demo/demo_electron-vue/node_modules/zeromq/build/Release/zmq.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 57. This version of Node.js requires
    NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or`npm install`).
        at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
        at Object.Module._extensions..node (module.js:598:18)
        at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
        at Module.load (module.js:488:32)
        at tryModuleLoad (module.js:447:12)
        at Function.Module._load (module.js:439:3)
        at Module.require (module.js:498:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (/Users/c/Demo/demo_electron-vue/node_modules/zeromq/lib/index.js:6:11)
        at Object.<anonymous> (/Users/c/Demo/demo_electron-vue/node_modules/zeromq/lib/index.js:840:3)
    
    Supplement 1  ·  Jul 5, 2017
    不大会用 node.js ,麻烦各位 v 友指点路
    stormpeach
        1
    stormpeach  
       Jul 5, 2017
    看起来是 node 版本不一致的问题,用 nvm 切换到对应的版本。
    ChangHaoWei
        2
    ChangHaoWei  
    OP
       Jul 5, 2017
    @stormpeach 不太会,本来准备用 electron 做 GUI 的,现在的话有点迷糊了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1216 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 64ms · UTC 23:26 · PVG 07:26 · LAX 16:26 · JFK 19:26
    ♥ Do have faith in what you're doing.