[SOLVED] QENV - quasar dev vs yarn dev - quasar dev does not apply qenv variables



  • qenv is not applied when I run quasar dev only when I run yarn dev.
    Any hint where I should look?

    dev script from package.json

    "dev": "cross-env QENV=development quasar dev",
    

    .quasar.env.json

    {
      "development": {
        "ENV_TYPE": "Running Development",
        "ENV_DEV": "development",
        "APP_DOMAIN": "localhost",
        "APP_PORT": "3000",
        "APP_TYPE": "Version for Academic and Non-Profit Organizations",
        "APP_LOGO": "logo-cloud.png"
      },
      "production-da": {
        "ENV_TYPE": "Running Production DataArch",
        "ENV_PROD": "production-dataarch",
        "APP_DOMAIN": "192.168.1.102",
        "APP_PORT": "3000",
        "APP_TYPE": "",
        "APP_LOGO": "logo-dataarch.png"
      },
      "production-cloud": {
        "ENV_TYPE": "Running Production Cloud",
        "ENV_PROD": "production-cloud",
        "APP_DOMAIN": "timesheet.simplesw.net",
        "APP_PORT": "8080",
        "APP_TYPE": "Version for Academic and Non-Profit Organizations",
        "APP_LOGO": "logo-cloud.png"
      }
    }
    
    quasar dev
    
     Dev mode.......... spa
     Pkg quasar........ v1.1.5
     Pkg @quasar/app... v1.1.2
     Debugging......... enabled
    
     app:extension Running "@quasar/qmarkdown" Quasar App Extension... +0ms
     app:extension Running "@quasar/testing-quality" Quasar App Extension... +4ms
     app:extension Running "@quasar/qenv" Quasar App Extension... +1ms
     app:extension Running "@quasar/icon-genie" Quasar App Extension... +349ms
     app:quasar-conf Reading quasar.conf.js +3ms
     app:dev Checking listening address availability (0.0.0.0:8080)... +2ms
     app:quasar-conf Extension(@quasar/qmarkdown): Extending quasar.conf... +4ms
     App Extension (qmarkdown) Info: 'Adding qmarkdown boot reference to your quasar.conf.js'
     App Extension (qmarkdown) Info: 'Adding markdown.styl css reference to your quasar.conf.js'
     app:quasar-conf Extension(@quasar/qenv): Extending quasar.conf... +1ms
    ! App Extension (qenv): missing QENV environment variable; skipping
     app:webpack Extension(@quasar/qmarkdown): Chaining SPA Webpack config +246ms
     App Extension (qmarkdown) Info: 'Adding markdown loader to chainWebpack in your quasar.conf.js'
     App Extension (qmarkdown) Info: 'Adding .vmd (vue+markdown) loader to chainWebpack in your quasar.conf.js'
     app:webpack Extending SPA Webpack config +7ms
     app:dev Extension(@quasar/icon-genie): Running beforeDev hook... +1ms
     app:generator Generating Webpack entry point +17ms
     app:dev-server Booting up... +3ms
    
    
     SPA █████████████████████████ [100%] in ~12s
    
    
    
     DONE  Compiled successfully in 12327ms               11:08:22 AM
    
    
     N  App dir........... /home/valasek/Programming/tests/timesheet/
    client
        App URL........... http://localhost:8080/
        Dev mode.......... spa
        Pkg quasar........ v1.1.5
        Pkg @quasar/app... v1.1.2
      
    ℹ 「wds」: Project is running at http://0.0.0.0:8080/
    ℹ 「wds」: webpack output is served from /
    ℹ 「wds」: 404s will fallback to /index.html
     app:dev-server Opening default browser at http://localhost:8080/
     +13s
    

    vs

    yarn dev
    yarn run v1.17.3
    $ cross-env QENV=development quasar dev
    
     Dev mode.......... spa
     Pkg quasar........ v1.1.5
     Pkg @quasar/app... v1.1.2
     Debugging......... enabled
    
     app:extension Running "@quasar/qmarkdown" Quasar App Extension... +0ms
     app:extension Running "@quasar/testing-quality" Quasar App Extension... +5ms
     app:extension Running "@quasar/qenv" Quasar App Extension... +1ms
     app:extension Running "@quasar/icon-genie" Quasar App Extension... +350ms
     app:quasar-conf Reading quasar.conf.js +4ms
     app:dev Checking listening address availability (0.0.0.0:8080)... +2ms
     app:quasar-conf Extension(@quasar/qmarkdown): Extending quasar.conf... +6ms
     App Extension (qmarkdown) Info: 'Adding qmarkdown boot reference to your quasar.conf.js'
     App Extension (qmarkdown) Info: 'Adding markdown.styl css reference to your quasar.conf.js'
     app:quasar-conf Extension(@quasar/qenv): Extending quasar.conf... +0ms
     app:webpack Extension(@quasar/qmarkdown): Chaining SPA Webpack config +257ms
     App Extension (qmarkdown) Info: 'Adding markdown loader to chainWebpack in your quasar.conf.js'
     App Extension (qmarkdown) Info: 'Adding .vmd (vue+markdown) loader to chainWebpack in your quasar.conf.js'
     app:webpack Extending SPA Webpack config +6ms
     app:dev Extension(@quasar/icon-genie): Running beforeDev hook... +1ms
     app:generator Generating Webpack entry point +13ms
     app:dev-server Booting up... +4ms
    
    
     SPA █████████████████████████ [100%] in ~12s
    
    
    
     DONE  Compiled successfully in 11834ms               11:07:27 AM
    
    
     N  App dir........... /home/valasek/Programming/tests/timesheet/
    client
        App URL........... http://localhost:8080/
        Dev mode.......... spa
        Pkg quasar........ v1.1.5
        Pkg @quasar/app... v1.1.2
      
    ℹ 「wds」: Project is running at http://0.0.0.0:8080/
    ℹ 「wds」: webpack output is served from /
    ℹ 「wds」: 404s will fallback to /index.html
     app:dev-server Opening default browser at http://localhost:8080/
     +12s
    


  • yarn dev is running your dev script from your package.json. This script is doing the env for node, before Quasar is started so it can be accessed in that instance.
    quasar dev by itself has no hooks for this and your package.json scripts are not called.


Log in to reply