ctf0 / Odin

manage model revisions with ease
MIT License
61 stars 3 forks source link

Vue version error #2

Closed kemalyen closed 5 years ago

kemalyen commented 5 years ago

I wish to report that when I've installed the script. But when I try to add revision control to model views, I'm facing a Vue package installation error. It occurs when I try to install JavaScript modules.

The error log is large but pates here a part of it:

Module build failed: Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options. at loadTemplateCompiler (/Users/kemalyenilmez/Documents/projects/evaluation/node_modules/vue-loader/lib/index.js:21:11) at Object.module.exports (/Users/kemalyenilmez/Documents/projects/evaluation/node_modules/vue-loader/lib/index.js:65:35)

I think some dependencies are compatible with others.

ctf0 commented 5 years ago

are u using laravel-mix or something else ?

kemalyen commented 5 years ago

I'm using Laravel 5.6

ctf0 commented 5 years ago

the vue-loader is installed with laravel-mix, however you might get a mis-match version when laravel-mix gets updated, try

npm remove laravel-mix;npm install laravel-mix --dev --save

also can u show me the webpack.mix.js content ?

kemalyen commented 5 years ago

And another problem is for stage release. But it would be not a common problem. I'm not publishing composer.json in staging server. Therefore package-changelog can't find it and breaks the script.

For that reason, I can not use it in preview releases. There would be control settings for that instead of checking composer.json.

mix.js('resources/assets/js/app.js', 'public/js')
    .js('resources/assets/js/file.js', 'public/js')
    .js('resources/assets/js/manage.js', 'public/js')
    .js('resources/assets/js/create.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css')
    .version();

// Odin
mix.sass('resources/assets/vendor/Odin/sass/style.scss', 'public/assets/vendor/Odin/style.css')

My error has been changed wheb removing and installing laravel-mix, now I'm receiving a sass error.

Here is the sass error:

> ERROR  Failed to compile with 6 errors                                                                                                                                                                                                                               16:23:04

 error  in ./node_modules/vue-awesome/components/Icon.vue?vue&type=style&index=0&lang=css&

Module parse failed: Unexpected token (25:0)
You may need an appropriate loader to handle this file type.
|
|
| .fa-icon {
|   display: inline-block;
|   fill: currentColor;

 @ ./node_modules/vue-awesome/components/Icon.vue 4:0-64
 @ ./resources/assets/vendor/Odin/js/manager.js
 @ ./resources/assets/js/app.js
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/vendor/Odin/sass/style.scss
ctf0 commented 5 years ago

i never thought that ppl would publish a project without the composer.json but thats a good point, i will fix that

ctf0 commented 5 years ago

@gazatem can u update the PackageChangeLogServiceProvider with https://github.com/ctf0/PackageChangeLog/blob/master/src/PackageChangeLogServiceProvider.php

and test if you still have the issue on the staging server ?

ctf0 commented 5 years ago

to fix the build error you need to re-install vue-awesome with npm install vue-awesome@v2 because npm have probably updated it to the latest version which have different names for the icons