Skip to content

Getting undefined #7

@aarcoraci

Description

@aarcoraci

Hello,
I'm trying to get this module working but no luck. I have followed the steps stated:

  1. added dependency via yarn
  2. added the module and configure it using a key from the env section of nuxt.config.js
  3. when I use it I get undefined every time.
  modules: [
    "bootstrap-vue/nuxt", 
    "cookie-universal-nuxt", 
    ['nuxt-env', {
      keys: ['baseUrl']
    }]
  ],
export default {
 mounted(){
   console.log(this.$env.baseUrl);  // undefined
   console.log(process.env.baseUrl); // correct url   
 }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions