Scotalia

Scotalia

Member Since 2 Years Ago

Experience Points
35,050
Total
Experience

4,950 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
342
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 8
35,050 XP
May
23
3 days ago
Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

this results in the same error. I think i am just going to manually combine all scripts into a single monolithic file and all styles into the same...this is too cumbersome. Thanks for your help @mvd!

May
22
4 days ago
Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

@mvd thanks for taking the time to review this.

when i remove the Arrays of scripts/styles to combine and do something like:

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

npm run dev works and compiles just fine....it SEEMS to be the use of scripts() and/or styles() or something in the arrays i am using for the combining of these, respectively. I'm just not sure what the issue is.

even if i try to combine 1 or 2 scripts (or styles) alone, using scripts() / styles() it does not run.

Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

@mvd The log details (sorry for the delay, my FT job has taken all my time the past couple days):

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'development' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predevelopment', 'development', 'postdevelopment' ]
5 info lifecycle @~predevelopment: @
6 info lifecycle @~development: @
7 verbose lifecycle @~development: unsafe-perm in lifecycle true
8 verbose lifecycle @~development: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/eurotripr.com/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/eurotripr.com/node_modules/.bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/craig/.local/bin:/home/craig/bin
9 verbose lifecycle @~development: CWD: /var/www/eurotripr.com
10 silly lifecycle @~development: Args: [ '-c',
10 silly lifecycle   'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 silly lifecycle @~development: Returned: code: 1  signal: null
12 info lifecycle @~development: Failed to exec development script
13 verbose stack Error: @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /var/www/eurotripr.com
16 verbose Linux 3.10.0-1127.8.2.el7.x86_64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
18 verbose node v10.20.1
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
22 error Exit status 1
23 error Failed at the @ development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
May
20
6 days ago
Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

@mvdnbrk I originally thought the missing ')' was in my webpack.mix file but i dont think i'm missing it there. I will check into v8-compile-cache. thanks

Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

@mvdnbrk I don't think this would be the correct place to close the array. The array of scripts/styles is the first argument of the scripts()/styles() function. For example: ''' mix.scripts(['single1.js','single2.js'], 'combined.js'); ''' the first arg is the array of scripts you want to combine, the final arg is the file you want to create of the combined scripts...unless i am totally missing something in the docs and am wrong on these functions.

Activity icon

Replied to Laravel Mix Problem - Can Not Combine Scripts & Styles

I 'stacked' the individual scripts and styles here to make it more readable. In my file they are all on a single line for scripts and a single line for styles. And yes, I have tried to add each one at a time. If i run the default mix file (i.e. mix.js('resources/js/app.js', 'public/js') ) it will compile, so i know that mix IS working, just not for combining these files.

const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.scripts(['public/js/jquery-3.1.1.min.js',
	'public/js/flickity.min.js',
	'public/js/easypiechart.min.js',
	'public/js/parallax.js',
	'public/js/typed.min.js',
	'public/js/datepicker.js',
	'public/js/isotope.min.js',
	'public/js/ytplayer.min.js',
	'public/js/lightbox.min.js',
	'public/js/granim.min.js',
	'public/js/jquery.steps.min.js',
	'public/js/countdown.min.js',
	'public/js/twitterfetcher.min.js',
	'public/js/spectragram.min.js',
	'public/js/smooth-scroll.min.js',
	'public/js/moment-with-locales.min.js',
	'public/js/scripts.js',
	'public/js/custom.js'],
 	'public/js/eurotripr.js')
    .styles(['public/css/bootstrap.css',
        'public/css/stack-interface.css',
        'public/css/lightbox.min.css',
        'public/css/flickity.css',
        'public/css/iconsmind.css',
        'public/css/jquery.steps.css',
        'public/css/theme.css',
        'public/css/custom.css'],
        'public/css/eurotripr.css');
Activity icon

Started a new Conversation Laravel Mix Problem - Can Not Combine Scripts & Styles

TLDR: I am trying to combine my Scripts and Styles using Mix. However i keep running into an error when I 'npm run dev' and 'npm run prod' .

The error:

SyntaxError: missing ) after argument list
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/www/eurotripr.com/node_modules/laravel-mix/setup/webpack.config.js:12:1)
    at Module._compile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
    at requireConfig (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
    at /var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
    at Array.forEach (<anonymous>)
    at module.exports (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
    at yargs.parse (/var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:71:45)
    at Object.parse (/var/www/eurotripr.com/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
    at /var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:49:8
    at Object.<anonymous> (/var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:366:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/var/www/eurotripr.com/node_modules/webpack/bin/webpack.js:156:2)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/craig/.npm/_logs/2020-05-20T05_33_23_069Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/craig/.npm/_logs/2020-05-20T05_33_23_079Z-debug.log

I have a LARGE number of scripts (18) and stylesheets (8) and am bogging my new site down with HTTP requests. I'm running CentOS and can not use HTTP/2 without compiling latest apache from source which i don't want to do due to inexperience. I have tried using 'combine(0' instead of 'scripts()'. I have tried the following from @JeffreyWay on one of Mix's github issues but it did not solve the issue:

npm cache clean --force

rm -rf node_modules package-lock.json

npm install

I have tried reducing the number of scripts and styles i am combining to 2, tried only combining scripts, only combining styles. I have reviewed the logs per the errors above, but nothing clearly explains to me what the actual error is nor how to resolve.

I am running CentOS 7, Apache 2.4.6, Laravel 6, 18.13, mix 6.14.4

Any thoughts as to what i could be doing wrong?

May
13
1 week ago
Activity icon

Awarded Best Reply on Cashier (11.2) Error In Live Laravel (6.16)

SOLVED: my server was bombing out of memory. I am not certain why my server could not allocate sufficient memory yet, BUT i finally noticed that my Laravel versions were SLIGHTLY out of sync (local: 6.18.13, live: 6.12.??). I attempted

composer update

but received this error:

mmap() failed: [12] Cannot allocate memory

I had to stop Apache and MySQL services, THEN rerun composer update, THEN restart Apache and MySQL. Composer updated to 6.18.14 and the site is working again!

Next task: increase memory or optimize the site/server.

Activity icon

Replied to Cashier (11.2) Error In Live Laravel (6.16)

SOLVED: my server was bombing out of memory. I am not certain why my server could not allocate sufficient memory yet, BUT i finally noticed that my Laravel versions were SLIGHTLY out of sync (local: 6.18.13, live: 6.12.??). I attempted

composer update

but received this error:

mmap() failed: [12] Cannot allocate memory

I had to stop Apache and MySQL services, THEN rerun composer update, THEN restart Apache and MySQL. Composer updated to 6.18.14 and the site is working again!

Next task: increase memory or optimize the site/server.

May
12
2 weeks ago
Activity icon

Started a new Conversation Cashier (11.2) Error In Live Laravel (6.16)

So i finally finished my MVP app and pushed the working files from my Local to Live server overnight. Super excited to wake up and see my site running only to be hit with a White Screen with no errors. :(

The only error i find is 'Symfony\Component\Debug\Exception\FatalErrorException: Trait 'Laravel\Cashier\Billable' not found in file /var/www/eurotripr.com/app/User.php on line 13' ( i found this in the Source tab of dev tools)

I have Cashier 11.2 running on Laravel 6.16. My local and live environments mirror each other in terms of OS and PHP versions. It worked flawlessly on Local, but i can't for the life of me figure out why it does not on Live. An alpha LIVE version was even working (without payments) yesterday with no issues.

User class definitiely is using Billable trait:

use Laravel\Cashier\Billable; // for STRIPE billings

class User extends Authenticatable implements MustVerifyEmail
{
    use Notifiable;
    use Billable; // for STRIPE billings

The Cashier folder is in Vendor/Laravel as needed.

I pushed all of my files up from my local to LIVE, edited my env accordingly for the stripe keys and environments et al. Imported my local DB to live server with a full overwrite. I generated a new Key for the laravel site when completed

I've spent a couple hours today already trying to troubleshoot, but most 'solutions' i find are for older versions and are several years old.

What I've tried (among things i may not remember): made sure my Storage dir has proper permissions (i set it to 777) php artisan key:generate (to generate a new key for live) composer dump-autoload cleared caches chmod public/index.php to -755 removed bootstrap/cache/services.php removed bootstrap/cache/packages.php php artisan cache:clear php artisan route:clear php artisan config:clear php artisan view: clear

It's probably something super small and stupid but at this time i can not figure it out and the more i 'panic' the less i figure out :/

Any help would be greatly appreciated...if you'd like to see any of my code, let me know.

Thanks!!!