Repository modules

paulgv

paulgv resolved the question #c132

modules • 7 days ago

Google Tag Manager - dataLayer net::ERR_ABORTED
besnikh

besnikh posted a new question

modules • 8 days ago

Google Tag Manager - dataLayer net::ERR_ABORTED

Hi,
I just installed Google Tag Manager module, and managed to track GA Pageviews, when I disabled the Preview mode I am getting this error in my console:
GET http://www.googletagmanager.com/gtm.js?id=GTMxxxxx&l=dataLayer net::ERR_ABORTED

I tried to do the following nuxt.conf

FareheSoheil

FareheSoheil posted a new question

modules • 8 days ago

Can't add the dependency using yarn
pencilpix

pencilpix posted a new question

modules • a month ago

Trying to make JsDoc generate the docs but it always fails because of `ejs` syntax

I build a project using nuxt and I depend on modules allover the app. the issue is when I try to generate documentation that would failed because of ejs template syntax <%= %> which return unexpected syntax error. if anyone can help me how to make jsdoc or any other package like jsdoc works

japboy

japboy posted a new question

modules • 2 months ago

Does google-tag-manager module provide a way to push DataLayer on server side?

My website currently working on transition to Nuxt heavily depends on GTM DataLayer which is set on server side.

Previous implementation of server side templates is like;

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(...);
window.dataLayer.push(...);
window.dataLayer.push(...);
</script>

so I have to prepare the dataLayer object before gtm.js is initialized. Does this module provide a way to do so?

Thanks.

bskimball

bskimball posted a new bug report

modules • 2 months ago

bug markdownit not working with nuxt-edge

Version

2

Steps to reproduce

When running @nuxtjs/markdownit with nuxt-edge, the build files with cannot read 'md' of undefined.

× fatal TypeError: Cannot set property 'md' of undefined
  at Builder.extendBuild.config (C:\wamp64\www\bdk-nuxt\node_modules\@nuxtjs\markdownit\index.js:21:39)
  at Builder.<anonymous> (C:\wamp64\www\bdk-nuxt\node_modules\nuxt-edge\dist\nuxt.js:149:23)
  at WebpackClientConfig.config (C:\wamp64\www\bdk-nuxt\node_modules\nuxt-edge\dist\nuxt.js:3017:56)
  at Builder.webpackBuild (C:\wamp64\www\bdk-nuxt\node_modules\nuxt-edge\dist\nuxt.js:3588:56)
  at Builder.build (C:\wamp64\www\bdk-nuxt\node_modules\nuxt-edge\dist\nuxt.js:3299:16)
  at <anonymous>
Nuxt Fatal Error :(

It looks to be when trying to add markdownitLoader to vueLoader in line 22 of index.js. on this command vueLoader.query.loaders['md'] = markDownItLoader. vueLoader.query.loaders is returning as undefined.

What is expected ?

To be able to use markdown files

What is actually happening?

build failure

Domitnator

Domitnator posted a new question

modules • 3 months ago

Bundling a nuxt module

Hi Guys,

I created a nuxt module which makes it easy to do api calls against the kentico-cloud cms: https://github.com/Domitnator/kenticocloud-nuxt-module

I had some struggles but now it all works fine and can installed trough npm: https://www.npmjs.com/package/kenticocloud-nuxt-module

Now i want to take it one step further and implement some basic caching functionality. So i created a CacheService for that which lives in a services folder (The reason I created this in a seperate file is because i want to be able to unit-test it with Mocha. This also works fine.):

folderStructure.PNG

And I am importing it in my plugin template:

import.PNG

But now i am running into problems when i want to use my module in my nuxt webapp:

import2.PNG

It cannot find the cache-service, which makes sense! So my question is: How should i fix this issue?

I thought already of the following options:

  • Bundling: My idea was to bundle the files by using rollupjs (https://rollupjs.org/guide/en). But then I am running into problems with the lodash-template syntax, which rollupjs wont accept.

lodashsyntax.PNG

Also the addPlugin method needs attention. I dont know how to work arround that right now

pathresolve.PNG

  • Concatenate: I could use a npm module to just concatenate the two files (plugin.template.js and cacheService.js). But feels like a hacky solution.

    Hopefully someone can point me in the right direction. I already looked at other nuxt-modules but i couldnt find one which has a solution for this issue.

Zsavajji

Zsavajji posted a new question

modules • 3 months ago

@nuxtjs/toast Not working in server context

Hi,
i'm trying to send a toast into a middleware which checks auth status. I wanted it to set a toast and redirect if the user is not logged, but i get an undefined error on app.$toast. I thought i could access $toast on the context.app, what am i doing wrong?

export default ({ store, app, redirect }) => {
  if(store.getters['user/isUserLogged']) {
    app.$toast.show('Already registered!');
    return redirect({ name: 'homepage' })
  }
}

Thanks

rbwilcoxon11

rbwilcoxon11 posted a new feature request

modules • 3 months ago

idea Exclude markdownIt from vendor

What problem does this feature solve?

Currently, I have a huge bundle size because prism.js is included in my vendor build. I want to avoid the Mb cost…

What does the proposed changes look like?

Essentially, the markdownit component needs to be available to the asyncData instance directly. I was thinking I could just use require in asnycdata—not sure if this will actually work—but if it were an option in the module that would be a lot easier. Some ways to do that are discussed in the nextjs blog post. https://arunoda.me/blog/ssr-and-server-only-modules

I tried the second option but couldn't get it working… maybe someone had success with another one of the options?

Zsavajji

Zsavajji posted a new question

modules • 4 months ago

@nuxtjs/toast - Usage in middleware

Hi,
i'm trying to send a toast into a middleware which checks auth status. I wanted it to set a toast and redirect if the user is not logged, but i get an undefined error on app.$toast. I thought i could access $toast on the context.app, what am i doing wrong?

export default ({ store, app, redirect }) => {
  if(store.getters['user/isUserLogged']) {
    app.$toast.show('Already registered!');
    return redirect({ name: 'homepage' })
  }
}

Thanks

NemoAlex

NemoAlex posted a new question

modules • 4 months ago

[Markdownit] Extra <section> added when using .md files

When I use require('./something.md') I get a HTML wrap by <section>, which is unnecessary I think.

The problem is this tag work against github's markdown style:

.markdown-body>*:first-child {
    margin-top: 0 !important;
}

Say I have something start with <h1>, the result is <section><h1>Title</h1><section>, <h1> tag's margin-top may not be removed.

smitray

smitray posted a new question

modules • 4 months ago

Axios baseUrl never changes

I've no clue and right now I feel like why am I even using this module. I've spent almost 9 hours to figure this out and unfortunately I'm writing this now. So if I've to use @nuxtjs/axios then my app has to run on port 3000 and that is fixed. That's irritating.

P.S. I'm not willing to use proxy

dotneet

dotneet posted a new question

modules • 5 months ago

@nuxtjs/markdownit doesn't works in nuxt2.0

I had encountered the following error in nuxt.js dev branch:

✖ error TypeError: Cannot set property 'md' of undefined
node_modules/@nuxtjs/markdownit/index.js:21:39

I think that markdownit module has to support vue-loader v15 to resolve this issue.

joostdecock

joostdecock posted a new question

modules • 5 months ago

Would you allow community projects to anchor under the Nuxt Gitter community and the nuxtjs.org domain?

I am involved in taking over care of the nuxtent module as its maintainer has moved on to other things. While this modules' GitHub repo is anchored under nuxtent-community, that seems to be where the brand consistency stops. So I was wondering about the following:

  • Is it possible for a project under nuxtent-community to create/get a Gitter chat room under the nuxt branch? Something like https://gitter.im/nuxt/community/nuxtent in our case would make a lot of sense and be intuitive to users
  • Similar question for a documentation site; Can this be published as a nuxtjs.org subdomain. For example https://nuxtent.community.nuxtjs.org (I'm not talking about hosting, just a CNAME record under which to reach the site on Netlify for example)

While these questions are pertinent to us, I also feel that they are relevant to other community projects. This effort at nuxtjs.cmty,io is a great initiative, and I for one would love to see more effort to organize the community so we can make it appealing to as many developers as possible.

It's worth pointing out that this is would not require much work (just creating a chat room and a DNS record). It's mostly a matter of giving community projects the tools to be as successful as they can be.

Thank you for considering it.

Hexodus

Hexodus posted a new bug report

modules • 5 months ago

bug @nuxtjs/firebase - package doesn't exist

Reproduction link

https://www.npmjs.com/search?q=%40nuxtjs%2Ffirebase

Steps to reproduce

Just check on npmjs for this package. See the link.

What is expected ?

@nuxtjs/firebase package should be available via npm

What is actually happening?

@nuxtjs/firebase package doesen't exist at all!

Additional comments?

The installation instruction is very unclear too. We should install @nuxtjs/firebase but add @nuxtjs/firebird to the modules and in the modules config there is a @rafamaciel/firebase

When this module is unsupported or will be abandoned so please state it clearly.

calbazasebastian

calbazasebastian posted a new question

modules • 5 months ago

scriptURL is not taken in consideration

If I'm not missing something the scriptURL from the options needs to be added also
See https://github.com/nuxt-community/modules/blob/8b451c1ae956ce04be6eb8a95bc98b29bc4a961b/packages/google-tag-manager/index.js#L7

swapagarwal

swapagarwal posted a new question

modules • 5 months ago

Last updated on (footer) module

Is there a module which adds a footer (something like "last updated on Mar 7, 2018") to every page?

stunjiturner

stunjiturner posted a new question

modules • 5 months ago

Support for Semantic-UI Module

Nothing to preview

Mei152

Mei152 posted a new question

modules • 6 months ago

Breaks not rendering when using $md.render()

Hello. Hoping for some direction here about what I might be doing wrong.
I am using the markdownit module to render content produced from the Netlify CMS editor. The markdown-it configuration breaks: true doesn't seem to be honored in the HTML output. I deleted linkify: true just to see if any of the config settings were working, and, indeed, http://bla.com stopped displaying as an anchor, so that at least that is working as expected.

Any idea why \n\n is not showing up as a <br>?
markdown-it docs say:

breaks - false. Set true to convert \n in paragraphs into <br>

Thanks for your help!

nuxt.config.js

 modules: [
    '@nuxtjs/markdownit'
  ],

  // [optional] markdownit options
  // See https://github.com/markdown-it/markdown-it
  markdownit: {
    injected: true,
    preset: 'default',
    linkify: true,
    breaks: true,
    use: [
      'markdown-it-container',
      'markdown-it-attrs'
    ]
  },

stuff.json

{
  "title": "Stuff",
  "date": "2018-03-01T23:59:10.464Z",
  "body": "Some stuff is here\n\n**And a whole bunch more here!**\n\n1. stuff\n2. stuff\n3. and more stuff\nhttp://bla.com"
}

stuff.vue

<template>
  <article>
    <h1>{{ title }}</h1>
    <div v-html="$md.render(body)"></div>
  </article>
</template>

<script>
  export default {
    async asyncData({ params }) {
      let stuff = await import('~/content/stuff.json');
      return stuff;
    }
  };
</script>

HTML output

<div id="__nuxt"><div class="nuxt-progress" style="width:0%;height:2px;background-color:#3B8070;opacity:0;"></div>
  <div id="__layout">
    <div>
      <article>
        <h1>Stuff</h1>
        <div>
          <p>Some stuff is here</p>
          <p><strong>And a whole bunch more here!</strong></p>
          <ol>
            <li>stuff</li>
            <li>stuff</li>
            <li>and more stuff<br>
            <a href="http://bla.com">http://bla.com</a></li>
          </ol>
        </div>
      </article>
    </div>
  </div>
</div>
zolotyx

zolotyx posted a new question

modules • 6 months ago

Usage of environment variables in modules

Is it required to use any environment parameters in the code of the modules?
I think that developers should enable/disable modules in nuxt.config.js depending on the environment?
Thank you.