dongtingyue
V2EX  ›  问与答

求自 vue 中引入 mqtt 报错问题

  •  
  •   dongtingyue · Apr 27, 2023 · 1196 views
    This topic created in 1112 days ago, the information mentioned may be changed or developed.
    npm run 起的开发环境
    ```
    import mqtt from 'mqtt'
    ....
    Vue.prototype.mqtt = mqtt
    ```
    为了全局使用 mqtt ,不用每个地方都用 import
    mqtt client.jst
    ```
    const nextTick = process ? process.nextTick : function (callback) {
    setTimeout(callback, 0);
    };
    ```
    报错
    process is not defined
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5546 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 665ms · UTC 08:23 · PVG 16:23 · LAX 01:23 · JFK 04:23
    ♥ Do have faith in what you're doing.