No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. r03ert0
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Best 0
    • Groups 0

    r03ert0

    @r03ert0

    0
    Reputation
    12
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    r03ert0 Follow

    Latest posts made by r03ert0

    • RE: Can't use the `serialport` module (building for electron)

      it didn’t…

      but I found this in serialport’s installation guide (https://serialport.io/docs/guide-installation):

      Electron
      Electron is a framework for creating cross-platform desktop applications. It comes with its own version of the Node.js runtime.
      If you require serialport as a dependency for an Electron project, you must compile it for the version of Electron your project's using.
      When you first install serialport it will compile against the version of Node.js on your machine, not against the Node.js runtime bundled with Electron.
      To recompile serialport (or any native Node.js module) for Electron, you can use electron-rebuild; more info at Electron's README.
      
      npm install --save-dev electron-rebuild
      Add electron-rebuild to your project's package.json's install hook
      Run npm install
      
      For an example project, check out electron-serialport.
      

      but that didn’t help either… How can I check which version of Node is electron using?

      posted in Help
      R
      r03ert0
    • RE: Can't use the `serialport` module (building for electron)

      argh… I’m on a Mac.
      I did manage to use serialport in a node-only command, but i’m a bit lost among all the layers that quasar adds.
      I found someone posting a similar issue, which was related to webpack, but i don’t know what to do with that information: https://github.com/serialport/node-serialport/issues/1789

      posted in Help
      R
      r03ert0
    • RE: Can't use the `serialport` module (building for electron)

      thank you @patryckx !
      i can’t see what it’s being done differently in that project… for me, just the fact of importing serialport triggers the error!

      posted in Help
      R
      r03ert0
    • Can't use the `serialport` module (building for electron)

      Hello,
      I’m trying to use the serialport module from npm, but it doesn’t work.
      The error can be reproduced by creating a blank quasar project, npm install serialport, and adding this to Index.vue:

      import * as serialport from 'serialport'
      console.log('serialport:', serialport)
      

      I get the following error:

      [HMR] Waiting for update signal from WDS...
      webpack-internal:///./.quasar/client-entry.js:46 [Quasar] Running ELECTRON.
      webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:17 [vue-router] Failed to resolve async component default: TypeError: Cannot read property 'indexOf' of undefined
      warn @ webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:17
      webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:17 [vue-router] uncaught error during route navigation:
      warn @ webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:17
      webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1925 TypeError: Cannot read property 'indexOf' of undefined
          at Function.getFileName (webpack-internal:///./node_modules/bindings/bindings.js:178)
          at bindings (webpack-internal:///./node_modules/bindings/bindings.js:82)
          at eval (webpack-internal:///./node_modules/@serialport/bindings/lib/darwin.js:1)
          at Object../node_modules/@serialport/bindings/lib/darwin.js (:8080/0.js:21)
          at __webpack_require__ (app.js:770)
          at fn (app.js:130)
          at eval (webpack-internal:///./node_modules/@serialport/bindings/lib/index.js:10)
          at Object../node_modules/@serialport/bindings/lib/index.js (:8080/0.js:32)
          at __webpack_require__ (app.js:770)
          at fn (app.js:130)
      

      Any idea?
      thank you!
      roberto

      posted in Help
      R
      r03ert0
    • RE: Where in the dir structure should a helper module go?

      thank you! 🙏

      posted in Help
      R
      r03ert0
    • Where in the dir structure should a helper module go?

      Hello,
      I’m building an app which does some data analysis. The data analysis code is encapsulated in a module. Where should that module file go? Not boot because it doesn’t need to be executed at the beginning; not component because it doesn’t show up in the screen; should it go to statics even if it’s not an image? Or should it just be placed like /src/my_module.js?

      thank you!

      posted in Help
      R
      r03ert0
    • RE: How to Share State Across Components?

      awesome! thank you! 🙏

      posted in Help
      R
      r03ert0
    • How to Share State Across Components?

      Hello,

      I’d like to have several components, in different routes, having access to the same data. This is very much what used to be described in http://quasar-framework.org/guide/components-sharing-state.html (here’s an old version), however, that page doesn’t exist anymore.

      What was proposed there was to have a single object var sourceOfTruth = {} used as shared data object in several components.

      Is it still possible to do this or was the idea deprecated?
      Where should I define such sourceOfTruth object so that I can share it across components?

      Thank you!

      posted in Help
      R
      r03ert0
    • RE: How to organise multiple QPageContainers within a QLayout?

      I just did a quick test with a <table> (no shame :D), and it works! So the flexbox should also work with some more dedication:

      <table>
      <tr>
          <td><q-page-container><q-page>QCard goes here</q-page></q-page-container></td>
          <td><q-page-container><q-page>And router-view goes here</q-page></q-page-container></td>
      </tr>
      </table>
      
      posted in Help
      R
      r03ert0
    • How to organise multiple QPageContainers within a QLayout?

      I’m coding a “user” page with multiple sub-pages (using routing). There’s a tab with user projects, user settings, etc.

      I would like to have a QCard with user information (picture, webpage, etc.) on the left that would stay there all the time (part of User.vue), and the tabs with the content of the project, settings, etc. routes on the right, that would change depending on the tab (Projects.vue, for example).

      How can I layout this? Is it even correct to have multiple QPageContainers within a single QLayout? I started to try to use a Flex Grid to organise the unchanging part (QCard) and the Tab contents, but it doesn’t work for the moment…

      Thanks in advance!

      posted in Help
      R
      r03ert0