Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login component missing after running npm install and npm run dev #413

Open
norrsken-jagare opened this issue May 14, 2019 · 2 comments
Open

Comments

@norrsken-jagare
Copy link

Detailed description

Question: I tried to remove the "Accept Terms and Conditions" part from the registration form (but I found NO legit way to do it in the documentation). Then I attempted to change a little bit of code and run npm install npm run dev and then the login form as well as the registration form are both gone. I later experimented the same on a fresh installation and without any changes in the VueJS codes and the same happened. All Vue.JS components including the two forms went missing and not rendered.

Context

The steps for editing the components should be documented in the documentation and also there seems to be a problem for editing the VueJS components related to this package.

Possible implementation

Not obligatory, but suggest an idea for implementing addition or change.

Your environment

Include as many relevant details about the environment you experienced the bug in and how to reproduce it.

  • Version used (e.g. PHP 5.6, HHVM 3): PHP 7.3
  • Operating system and version (e.g. Ubuntu 16.04, Windows 7): Ubuntu 18.04
  • Link to your project: None, it is currently developmental
  • ...
  • ...
@norrsken-jagare
Copy link
Author

Supplementary information:

The exact method for reproducing the issue is:
laravel new project-name
cd project-name
Then install this package
composer global require "acacha/adminlte-laravel-installer"
adminlte-laravel install
At this point everything works fine
Then try npm install - npm install fails at this point but the UI is still here
But then when trying to run npm run dev then the login UI screws up
P.S. on one new project without installing the adminlte-laravel the npm install works fine

Essentially I wanted to change the VueJS files and reload them to my app but even without any change to the vue files the above problem still persists.

@chooikw
Copy link

chooikw commented Jun 23, 2019

I noticed the app.js is missing in the current master branch, that's why it can't load auth vue components.

Create app.js in resources/assets/js/app.js with following sample and run npm run dev again

/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

/**
 * The following block of code may be used to automatically register your
 * Vue components. It will recursively scan this directory for the Vue
 * components and automatically register them with their "basename".
 *
 * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
 */

// const files = require.context('./', true, /\.vue$/i);
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));

Vue.component('register-form', require('./components/auth/RegisterForm'));
Vue.component('login-form', require('./components/auth/LoginForm'));
Vue.component('email-reset-password-form', require('./components/auth/EmailResetPasswordForm'));
Vue.component('reset-password-form', require('./components/auth/ResetPasswordForm'));

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

const app = new Vue({
    el: '#app',
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants