Activities

Sjoerrdd

Sjoerrdd posted a new question

adonuxt-template •

Adonuxt deprecated

What?
Why is this deprecated?
What can I use instead of this?
I love Adonuxt <3

axlyody

axlyody posted a new question

adonuxt-template •

Append html nuxt.render

It's possible to append nuxt.render() with meta tags CSRF using Promise?
image

hkmsadek

hkmsadek posted a new question

adonuxt-template •

RangeError Maximum call stack size exceeded

I am getting this error with this version.

RangeError
Maximum call stack size exceeded

App is not loading and there is nothing much in the app. Only one asyncData call.

vintprox

vintprox posted a new question

adonuxt-template •

Production build injects global CSS onto page instead of file

I'm not sure if it's intended behavior, but when I run production build, CSS contents (<style data-vue-ssr-id="a473c1a4:0 17cfdfa9:0 40238fea:0">...</style>) are appended to <head> - no matter what this section of Nuxt Guide tells us.

Expected

I expected that global CSS being injected into final file like styles.css, so that it could be just referred on any page (automatically) and everybody would benefit from caching.

Test

$ npm i -D tailwindcss

config/nuxt.js

<...>

module.exports = {
  <...>
  /*
  ** Global CSS
  */
  css: [
    { src: '~assets/sass/app.sass', lang: 'sass' }
  ],
  <...>
  build: {
    postcss: {
      plugins: {
        'tailwindcss': {}
      }
    }
  }
}

resources/sass/app.sass

@tailwind preflight
@tailwind components
@tailwind utilities

Tailwind CSS was compiled succesfully for my surprise, that let me see it in action with Adonuxt. Unfortunately injecting same stuff for every page makes production build bloated. Can we fix this?

padinko

padinko posted a new bug report

adonuxt-template •

bug Unable to import npm module in less

Version

latest

Reproduction link

http://example.com

Steps to reproduce

npm install normalize.css

@import "~normalize.css";

What is expected ?

it compiles less file and it will include normalize.css

What is actually happening?

Module build failed (from ./node_modules/postcss-loader/src/index.js): friendly-errors 15:08:14
Error: Can't resolve '~normalize.css' in 'C:\web\work\zeo-adonuxt\resources\assets\less'

Additional comments?

Hello,
in less-loader there is native alias ~ for importing npm modules, but in adonuxt it's imposibble.
there is problem probably with your alias, which is the same as less-loader alias ~

padinko

padinko posted a new question

adonuxt-template •

Unable to import npm module in less

Hello,
in less-loader there is native alias ~ for importing npm modules, but in adonuxt it's imposibble:

@import "~normalize.css";
Module build failed (from ./node_modules/postcss-loader/src/index.js): friendly-errors 15:08:14
Error: Can't resolve '~normalize.css' in 'C:\web\work\zeo-adonuxt\resources\assets\less'

there is problem probably with your alias, which is the same as less-loader alias ~

Geowan

Geowan posted a new question

adonuxt-template •

Using adonis Env throws an error

Am trying to use the adonis Env use in my resources plugins but this fails

I have created a vuescoketio plugin in the resources/plugins

 import Vue from 'vue'
import store from '../store'
import VueSocketIO from 'vue-socket.io'
const Env = use('Env');
Vue.use(new VueSocketIO({
  debug: true,
   connection: Env.get('SOCKET_URL', 'https://localhost:5389'),
  vuex: {
    store,
    actionPrefix: 'SOCKET_',
    mutationPrefix: 'SOCKET_'
},

}))

But the above always throws an error

    ReferenceError: use is not defined

Which i believe is from const Env = use('Env')

How can i use the ENV as specified on the adonis documentation at https://adonisjs.com/docs/4.0/configuration-and-env

kudapara

kudapara posted a new question

adonuxt-template •

The adonis subdomain of the nuxt website is not loading

Hi

I am trying to access the documentation for adonuxt but the website https://ado.nuxtjs.org is saying not found. Could this be a bug?

image

Tinostarn

Tinostarn posted a new question

adonuxt-template •

Build broken after migrating Nuxt to v2.3.4

Hello,

Just upgraded Nuxt from 1.4.1 to 2.3.4

Cannot set property 'render' of undefined

Is there anything related to Webpack 4 that need to be updated in the original Adonuxt template ?

Help appreciated :)

raultrysw

raultrysw posted a new question

adonuxt-template •

Change the publicPath directory of adonis

I was trying to upload an image file to the public path but, using Helpers.publicPath, I get the file onto the public directory instead of in the resources/public directory

How can I change the publicPath?

OndrejCibulka

OndrejCibulka posted a new question

adonuxt-template •

[Question] Two Nuxt instances in single project

Hello,
I am building web application which has control panel and user part. I need to separate global components, stylesheets and other things for each of those parts. It would be best to have two separate instances of Nuxt. Does anybody have some experiences with this and can provide me some solution?
Thank you a lot.

Geowan

Geowan posted a new question

adonuxt-template •

Authetication on nuxtjs not working

Am trying to authenticate with adonixjs jwt like this

   const user = await User.query()
        .where('email', email)
        .first()
   let passwordVerified = await Hash.verify( password,user.password)
    console.log(passwordVerified) //this is always false

The above always returns false. I have also noted the hash.js file is missing. How do i resolve this

I have also asked the question at stackoverflow at this link

Geowan

Geowan posted a new question

adonuxt-template •

Performing redirrects on routes

In actual nuxt without adonis its possible to do this

     {
  path: '/cloud',
  component: 'pages/cloud/Dash.vue',
  children:[
      {path:'', redirect: 'user'},
     {
       name: 'user',
       path: '/user',
      component: 'pages/cloud/user/index.vue'
   },
  ]

},

How do i achieve the same in adonuxt. I have tried the following. In the file start/routes.js there is

     Route.any('*', 'NuxtController.render');

Now in my pages folder i have the following structure

        cloud
              ->user
                   ->user.vue

Now checking on the .nuxt/routes its generating them as

        routes: [
    {
        path: "/cloud/user",
        component: _a824fb5a,
        name: "cloud-dashboard"
    },
    ....
  ],

How do i perform a redirrect on adonuxt when user access http://3000/cloud he is redirrected to /cloud/user

shredmaster

shredmaster posted a new question

adonuxt-template •

dev server not hot reload changes under resources directory

Just created a project with the template and I am having trouble getting hot reload to work. When I change the vue component, the page does not automatically reload. does anyone know what am i missing?

this is what i get after running "npm run dev"
`
INFO Building project

✔ success Builder initialized
✔ success Nuxt files generated

Hash: 6832ea18d6aa2128b626
Version: webpack 4.20.2
Time: 14123ms
Built at: 2018-09-30 22:51:34
Asset Size Chunks Chunk Names
fonts/815694d.woff 84.8 KiB [emitted]
fonts/9b6c8da.eot 116 KiB [emitted]
fonts/70e65a7.eot 176 KiB [emitted]
img/ffd9a8d.png 23.2 KiB [emitted]
fonts/48461ea.woff2 63.8 KiB [emitted]
fonts/7b464e2.woff 74.6 KiB [emitted]
fonts/947b953.ttf 116 KiB [emitted]
img/b547263.svg 633 KiB [emitted] [big]
fonts/949a2b0.woff2 14.5 KiB [emitted]
fonts/381af09.woff 17.7 KiB [emitted]
fonts/73fe7f1.ttf 39.4 KiB [emitted]
img/b5a61b2.svg 139 KiB [emitted]
fonts/14a0819.woff2 65.8 KiB [emitted]
fonts/7422060.eot 39.6 KiB [emitted]
fonts/0079a0a.ttf 176 KiB [emitted]
img/38508b2.svg 665 KiB [emitted] [big]
269edc6fb3d66e2b930b.js 265 KiB 0 [emitted] [big] app
b720d67bb6e50e09d0fb.js 8.2 KiB 1 [emitted] pages/ticket
bae2fc8ada70dfba4523.js 1.27 KiB 2 [emitted] pages/about
545d380f79323d20d022.js 30.9 KiB 3 [emitted] pages/cart
5a0870b15ed6c754d8fa.js 6.5 KiB 4 [emitted] pages/products/_slug
9080213c4b3b91e9c74f.js 3.55 KiB 5 [emitted] pages/index
df54b349e569568e958b.js 157 KiB 6 [emitted] commons.app
7922875d3ca5b9401163.js 398 KiB 7 [emitted] [big] vendors.app
bca388de40a304e7acb7.js 2.27 KiB 8 [emitted] runtime
LICENSES 722 bytes [emitted]
manifest.6c9f4730.json 348 bytes [emitted]

  • 3 hidden assets
    Entrypoint app = bca388de40a304e7acb7.js df54b349e569568e958b.js 7922875d3ca5b9401163.js 269edc6fb3d66e2b930b.js

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
img/b547263.svg (633 KiB)
img/38508b2.svg (665 KiB)
269edc6fb3d66e2b930b.js (265 KiB)
7922875d3ca5b9401163.js (398 KiB)

Hash: 2f56c216047784a699f6
Version: webpack 4.20.2
Time: 5400ms
Built at: 2018-09-30 22:51:39
Asset Size Chunks Chunk Names
server-bundle.json 1.13 MiB [emitted]
Entrypoint app = server-bundle.js server-bundle.js.map
2018-10-01T02:51:39.696Z - info: Nuxt is ready to handle requests`

richie3366

richie3366 posted a new question

adonuxt-template •

Nuxt compiles from scratch when editing adonis files

Hello

I'm noticing that when I work on backend classes while npm run dev is running, the process restarts and the nuxt compiler takes way more time compared to when it re-compiles after editing a Vue page/component.

So… I'm thinking that it recompiles from scratch.
And… it's very annoying to have to wait each time I save & test something I just coded.

I found a sort of workaround: comment the Nuxt service build line in the server.js file.
Like this:

.fireHttpServer()
  .then(() => {
    // use('App/Services/Nuxt').build()
  })

But I think it's not the best way to get around this issue, since I have to preload the project in my browser before switching the line to disable the auto-compiler.

Would it be possible to skip the re-render when a backend-only change occurs?
Thanks

GuiBCa

GuiBCa posted a new question

adonuxt-template •

Problems to send mail with SMTP Google

I'm trying send a email but the page stay loading for much time and nothing returns…

I used this guide https://adonisjs.com/docs/4.0/mail#sponsor

start/routes.js

...
// Test
  Route.get('mail/test', 'MailController.Test')
...

app/Controllers/Http/MailController.js

'use strict'

const Mail = use('Mail')

class MailController {
  async Test ({ response }) {
    await Mail.raw('... everyone who got this message.', (message) => {
      message.subject('Hello ...')
      message.from('[email protected]')
      message.to('[email protected]')
    })

    await response.json({ success: true })
  }
}

module.exports = MailController
GuiBCa

GuiBCa posted a new question

adonuxt-template •

Problems to send mail with SMTP Google

I'm trying send a email but the page stay loading for much time and nothing returns…

I used this guide https://adonisjs.com/docs/4.0/mail#sponsor

start/routes.js

...
// Test
  Route.get('mail/test', 'MailController.Test')
...

app/Controllers/Http/MailController.js

'use strict'

const Mail = use('Mail')

class MailController {
  async Test ({ response }) {
    await Mail.raw('... everyone who got this message.', (message) => {
      message.subject('Hello ...')
      message.from('[email protected]')
      message.to('[email protected]')
    })

    await response.json({ success: true })
  }
}

module.exports = MailController
guibragamonte

guibragamonte posted a new question

adonuxt-template •

Error 502 in Gcloud App Engine deploy

After deploy, the application has returns error 502.
I already set port to 8080 and inserted the health check route like bellow

// GCloud Health Check
Route.get('/_ah/health', (req, res) => {
  res.status(200)
  res.send()
})

I missed a config?

guibragamonte

guibragamonte posted a new question

adonuxt-template •

Deploy in Google Cloud App Engine

When i execute deploy, the page stay loading and nothing happen.
Which are the configurations?

sergiocastrovale

sergiocastrovale posted a new question

adonuxt-template •

Unexpected token import when attempting to load Nuxt plugins

I need to use some external plugins bundled with Nuxt, so I added this to my nuxt.js file:

  build: {
    analyze: false,
    vendor: ['axios'],
    extend (config, ctx) {
      config.resolve.alias['vars'] = resolve(__dirname, '..', 'resources/assets/scss/_variables.scss')

      if (ctx.isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
      }
    }
  },

  modules: [
    '@nuxtjs/axios',
    '@nuxtjs/auth',
    '@nuxtjs/toast',
    'bootstrap-vue/nuxt',
    ['nuxt-i18n', i18n]
  ],

  plugins: [
    '~plugins/modal',
    '~plugins/axios',
    { src: '~/plugins/amcharts', ssr: false }
  ],

However, whenever run npm run dev I'm getting unexpected token import and other ES6 related issues.

Example with amcharts.js:

import * as am4core from '@amcharts/amcharts4/core'
import * as am4maps from '@amcharts/amcharts4/maps'
import am4themesAnimated from '@amcharts/amcharts4/themes/animated'
import am4geodataWorldLow from '@amcharts/amcharts4-geodata/worldLow'
import Vue from 'vue'

am4core.useTheme(am4themesAnimated)

Vue.prototype.$am4core = () => {
  return {
    am4core,
    am4maps,
    am4geodataWorldLow
  }
}

Output:
screenshot_1

Am I missing something here? Shouldn't I be able to use ES6 in my plugins?