M
M
mrFlyer2017-03-06 15:28:01
npm
mrFlyer, 2017-03-06 15:28:01

Laravel5 + CoreUI + Vue2, what am I doing wrong?

Hi all.
Complete newbie to Node and Vue. I'm trying to make an admin panel for a Larave project on CoreUI and not understanding the principles of assembly does not allow me to defeat this matter in any way. Please point me in the right direction.
So, what I do: I
create a folder where I will store the admin application:
resources\assets\cabinet
I throw the contents of the Vue_Full_Project folder from the CoreUI github there I supplement
package.json with dependencies:

"laravel-elixir": "^6.0.0-15",
"laravel-elixir-vue-2": "^0.3.0",
"laravel-elixir-vueify": "^1.0.6",
"laravel-elixir-webpack-official": "^1.0.10"

I start installing packages
npm install --save-dev
Next, I want to get a single app.css and app.js to include in the HTML template
. I replace gulpfile.js with my own:
const elixir = require('laravel-elixir');

  require('laravel-elixir-vue-2');

  elixir((mix) => {
    mix.sass('./scss/style.scss','./public/css/cabinet/app.css')
      .webpack('./src/main.js','./public/js/cabinet/app.js')
      .copy('node_modules/font-awesome/fonts','/public/fonts/cabinet');
  });

I execute gulp in the folder: resources\assets\cabinet
Css is formed without problems. But when assembling the JS file, an error occurs with the paths:
> gulp
[14:43:06] Using gulpfile c:\WebServer\_domains\domainName\sources\resources\assets\cabinet\gulpfile.js
[14:43:06] Starting 'all'...
[14:43:06] Starting 'sass'...
[14:43:09] Finished 'sass' after 2.11 s
[14:43:09] Starting 'webpack'...
{ [Error: ./src/router/index.js
Module not found: Error: Can't resolve 'containers/Full' in 'c:\WebServer\_domains\domainName\sources\resources\assets\cabinet\src\router'
resolve 'containers/Full' in 'c:\WebServer\_domains\domainName\sources\resources\assets\cabinet\src\router'
  Parsed request is a module
  using description file: c:\WebServer\_domains\domainName\sources\resources\assets\cabinet\package.json (relative path: ./src/router)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: c:\WebServer\_domains\domainName\sources\resources\assets\cabinet\package.json (relative path: ./src/router)
    resolve as module

Full.vue is in resources\assets\cabinet\src\containers
Thanks in advance for your help!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question