Activities

Crimsonspell

Crimsonspell posted a new question

adonuxt-template •

How to Build a Medical Startup: A Useful Resource Guide

Building a healthcare startup is not a simple task: The risk is higher than for almost any other vertical, the costs of building and launching a healthcare product are huge, and, on top of that, the regulatory clearance might take a long time.

While the above sounds terrifying, there are plenty of cases highlighting that it's fully possible! Thie guide was created speacially for those who thinks about healthcare app development
https://steelkiwi.com/blog/how-to-build-a-medical-startup/

javazquez

javazquez posted a new question

adonuxt-template •

Documentation Clarification - Deployment AWS

I am following the steps for deploying Nuxt to Amplify and have a successful deployment. The documentation then says upon completion of the verify step that I should click the link to view my site. I assumed that I would see my running application, however I am greeted with the following

<Error> AccessDenied <Message>Access Denied</Message> <RequestId>…</RequestId> <HostId> … </HostId> </Error>

I am wondering if this is expected?

Additional context

Link to the page I am referencing
https://github.com/nuxt/nuxtjs.org/blob/master/content/en/guides/deployment/deployment-amazon-web-services.md#review

Crimsonspell

Crimsonspell posted a new question

adonuxt-template •

Developing a Loyalty App for Your Restaurant: Success Stories, Features, and Tips

In this article, we focus on how restaurant loyalty apps can be used to build customer loyalty. We demonstrate this with examples of the world’s top food chains. We also outline must-have features and conclude with useful tips on how to set up an effective loyalty program. But first, let’s talk about why restaurants should go mobile for building customer loyalty.
https://steelkiwi.com/blog/developing-a-loyalty-app-for-restaurant/

Crimsonspell

Crimsonspell posted a new question

adonuxt-template •

Mobile Application Development Services for New or Existing Business

"Hello folks! I want to introduce you an awesome mobile app development company - Steelkiwi. With their help you can get a mobile app with flawless performance and great user interface coded in Swift or Objective-C for iOS and Kotlin or Java for Android. Build a native app for iOS, Android or build a cross-platform app.

If you need mobile development services then Steelkiwi will be a good choice. Feel free to write me if you have any questions=)"
https://steelkiwi.com/services/mobile-development/

segunemma2003

segunemma2003 posted a new question

adonuxt-template •

nuxtServerInit works on dev but not on production

When i refresh my page on production, it shows me errors

fre2mansur

fre2mansur posted a new question

adonuxt-template •

Could not access the custom plugin in method.

Hello,

I have created a plugin in the plugin folder paginate.js

export default (context, inject) => {
const paginate = ( totalItems,
currentPage = 1,
pageSize = 10,
maxPages = 10) => {
return "something";
}
inject('pagiante', paginate)
context.$paginate = paginate
}

I imported in nuxt-config.js
plugins: [
'@/plugins/paginate.js'
]

In my component
async asyncData({$axios, $auth, $paginate}) {
console.log($pagiante(20)) --------------------------> its working fine
},
methods: {
async search() {
console.log(this.$paginate(10)) -----------------------> not working (TypeError: _this.paginate is not a function)
}
}

what I am missing here?

jas777

jas777 posted a new bug report

adonuxt-template •

bug Stuck in endless refresh loop

Version

next

Reproduction link

https://aurora.codeforge.cf/

Steps to reproduce

Sign in with GitHub
Remove cookies
Refresh

What is expected ?

The page should not refresh

What is actually happening?

It's stuck in an endless refresh loop

Additional comments?

(auth-next in case cmty changes the version)

VoKhuong

VoKhuong posted a new bug report

adonuxt-template •

bug Error raised when mutating a copy of an object inside a store getter

Version

2.13

Steps to reproduce

In my store, i've declared getters like this :

export const getters = {
  foo(state) {
    return (range) => {
      const result = Object.assign({}, state.bar)
      result[range].push('test') // raise an error
      return result
    }
}

When I call it in my component, I get a Vuex error : [vuex] do not mutate vuex store state outside mutation handlers
It only occurs when I'm mutating the array, if instead of doing a push i assign that property to a value (for example an integer):

result[range] = 1

It doesn't raise any error. Also, I can output the result of that getter without any problem, the array end with 'test' and the original array is not modified.

What is expected ?

Nothing, it shouldn't raise any error when I modify an array of a copy of an Object.

What is actually happening?

An error is raised when I add an element to an array of a copy of an Object.

uqcire

uqcire posted a new question

adonuxt-template •

element-ui custom scss variables not woking in

Can anyone please provide help out with a full solution of using custom scss variables in nuxt-element?

Lee-hyuna

Lee-hyuna posted a new question

adonuxt-template •

ERR_REDIRECT

Why is ERR_REDIRECT thrown here?

tol64

tol64 posted a new question

adonuxt-template •

Laragon/Nginx + Laravel + Nuxt: 419 — CSRF token mismatch

Please help me solve this task.

A series of lessons based on the material: https://youtu.be/KFgi3IqavK4


Windows 10 operating system

Path to the project: C:\laragon\www\larastart-project

There are two folders in this directory:

  • C:\laragon\www\larastart-project\backend
  • C:\laragon\www\larastart-project\frontend

The first (backend) is the Laravel framework.

The second (frontend) is the Nuxt framework.

Laragon/Nginx settings

Laragon

Contents of the file auto.larastart-project.test.conf

server {
    listen 8080;
    listen 8443 ssl;
    server_name larastart-project.test *.larastart-project.test;
    root "C:/laragon/www/larastart-project/";

    index index.html index.htm index.php;

    location / {
    proxy_buffers 16 4k;
    proxy_buffer_size 2k;

    # npm run dev
    proxy_pass http://localhost:3000;

    # try_files $uri $uri/ /index.php$is_args$args;
    # autoindex on;
    }

    location /api {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;

    # php artisan serve
    proxy_pass http://localhost:8000/api;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;        
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    # Enable SSL
    ssl_certificate "C:/laragon/etc/ssl/laragon.crt";
    ssl_certificate_key "C:/laragon/etc/ssl/laragon.key";
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on;


    charset utf-8;

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /\.ht {
        deny all;
    }
}

Laravel settings

Dependencies in composer.json. The package Sanctum is used for authentication: https://laravel.com/docs/7.x/sanctum#spa-authentication

"require": {
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "intervention/image": "^2.5",
        "laravel/framework": "^7.0",
        "laravel/sanctum": "^2.4",
        "laravel/tinker": "^2.0",
        "spatie/laravel-medialibrary": "8.0.0"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.7",
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "laravel/ui": "^2.0",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },

File .env

APP_URL=http://localhost
CORS_ALLOWED_ORIGIN=http://localhost:3000
SANCTUM_STATEFUL_DOMAINS=http://localhost:8000
SESSION_DRIVER=file
SESSION_DOMAIN=localhost

File config\cors.php

return [
    'paths' => [
        'api/*',
        'login',
        'logout',
        'user',
        'sanctum/csrf-cookie',
    ],
    'allowed_methods' => ['*'],
    'allowed_origins' => ['*'],
    'allowed_origins_patterns' => [],
    'allowed_headers' => ['*'],
    'exposed_headers' => [],
    'max_age' => 0,
    'supports_credentials' => true,
];

File app\Http\Kernel.php

...
protected $middlewareGroups = [
...
        'api' => [
            EnsureFrontendRequestsAreStateful::class,
            'throttle:60,1',
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
    ];
...

Nuxt settings

Dependencies in package.json

    "dependencies": {
        "@nuxtjs/auth": "^4.9.1",
        "@nuxtjs/axios": "^5.3.6",
        "@nuxtjs/dotenv": "^1.4.1",
        "@nuxtjs/proxy": "^2.0.0",
        "bootstrap": "^4.5.0",
        "bootstrap-vue": "^2.15.0",
        "cookie-universal-nuxt": "^2.1.4",
        "iview": "^3.1.5",
        "jquery": "^3.5.1",
        "moment": "^2.27.0",
        "nuxt": "^2.0.0",
        "popper.js": "^1.16.1",
        "prismjs": "^1.20.0"
    },
    "devDependencies": {
        "node-sass": "^4.14.1",
        "nuxt-purgecss": "^1.0.0",
        "sass-loader": "^8.0.2"
    }

File .env

API_URL=http://localhost:8000/api
API_DOMAIN=http://localhost:8000

File nuxt.config.js

The settings related to authentication are shown.

...
    modules: [
        '@nuxtjs/axios',
        '@nuxtjs/auth',
        '@nuxtjs/proxy',
        '@nuxtjs/dotenv',
        'bootstrap-vue/nuxt',
        [
            'cookie-universal-nuxt', {
                alias: 'cookie'
            }
        ],
    ],
    auth: {
        strategies: {
            local: {
                endpoints: {
                    login: {
                        url: process.env.API_DOMAIN + '/login',
                        method: 'post'
                    },
                    logout: {
                        url: process.env.API_DOMAIN + '/logout',
                        method: 'post'
                    },
                    user: {
                        url: process.env.API_DOMAIN + '/user',
                        method: 'get',
                        propertyName: false
                    }
                },
                tokenRequired: false,
                tokenType: false
            }
        }
    },
    axios: {
        baseURL: process.env.API_DOMAIN,
        credentials: true
    },
...

Check the token request in the program Postman: https://www.postman.com/.

You can see that the data is being released.

Postman

Then we make a page with a test form: pages\auth\signin.vue

Method code:

   methods: {
        async login() {
            try {
                await this.$axios.$get('http://localhost:8000/sanctum/csrf-cookie');
                await this.$auth.loginWith('local', {
                    email: this.form.email,
                    password: this.form.password,
                });
                this.$router.replace('/');
            } 
            catch (e) {
                this.errors = 'Could not sign you with these credentials.';
                console.log(e);
            }
        }
    }

Result:

Result

More:

More_01

More_02

More_03

There is no XSRF-TOKEN on the Application tab. It seems to be here also when sending the form data.

More_04

Try to play it at your place. Can you tell me what's missing, please?

Haotian9850

Haotian9850 posted a new question

adonuxt-template •

Using auth0 with nuxt/auth: Bearer token expires too soon

Hi there, we are using auth0 in our nuxt project with the nuxt/auth module. One problem we have so consistently experienced: the expiration of our client-side bearer token seems too soon - we have set both the application-level (ID Token Expiration , Refresh Token Lifetime (Absolute)) and tenant-level (Inactivity timeout, Require log in after) to some very large values (i.e. a couple days), but the client-side stored Bearer token still seems to expire even after a few hours since it is issued (and incidentally our application recieves a 401 when .fetchUser() is called i.e. querying the /userinfo endpoint on our auth0 tenant), and the user is forced to log in again (even just after a couple hours since last log in).

Here is our whole authentication flow (runs when our application is loaded everytime):

  if(!this.$auth.loggedIn){
    // a token stored means user has not manually logged out, so he needs to be authenticated automatically
    if(this.$auth.getToken("auth0")){
      try{
        await this.$auth.fetchUser();
        if(this.$auth.loggedIn){
          console.log("Authentication successful!");
        }else{
          console.log("Authentication failed...")
        }
      }catch(err){
          console.log("Authentication error...")
      }
    }else{
      console.log("No token found, not authenticating...");
    }
  }else{
      console.log("Already authenticated!");
  }else{
      # no token available on client-side => do nothing 
  }

And in our nuxt.config.js:

  auth: {
    redirect: {
      login: "/",
      logout: "/",
      callback: "/",
      home: "/"
    },
    strategies: {
      auth0: {
        domain: "OUR_TENANT.auth0.com",
        client_id: "OUR_CLIENT_ID",
        audience: "https://OUR_TENANT.auth0.com/api/v2/"
      }
    }
  },

Having users log in every time our application is loaded significantly hinders user experience - Is there any setting / configuration we are missing here? Any help / suggestion is appreciated! Thanks!

AllanOricil

AllanOricil posted a new question

adonuxt-template •

a

a

elviskudo

elviskudo posted a new question

adonuxt-template •

adminlte integration

Hi,

Wooww, youre so great, to merge adonisjs with vuejs like this, i love it
Now, my api runs great
I'll try to implement AdminLTE to your great app
Can you give me detail step to do this?
Thanks

adminlte

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 ~