How To Fix “Laravel Mix NPM run dev error” | Laravel Mix Error | Compiling Error Laravel

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 140

  • @codewithdary
    @codewithdary  2 года назад +1

    LETS CONNECT THROUGH INSTAGRAM.
    instagram.com/codewithdary

  • @haykazvoskanyan7176
    @haykazvoskanyan7176 2 года назад +3

    after 5 hours of digging the web I find the solution in 5 minutes. Thanks a lot

  • @Mohamed_jeddah
    @Mohamed_jeddah 3 года назад +1

    I m here from the 6 & half hour laravel video . Great job Dary.

  • @roy786
    @roy786 2 года назад +2

    Thanks Dary. I was having this issue every time I compile resources. Only way to get around was to delete npm and nodejs and re-install which was really ruining my experience using laravel mix and npm. I will try your method and see how I go.

  • @nibirbhowmik1703
    @nibirbhowmik1703 3 года назад

    I have been trying this for about 2 days. And i got another solution that is
    replace this code
    mix.js('resources/js/app.js', 'public/js')
    .vue()
    .sass('resources/sass/app.scss', 'public/css');
    add this code
    mix.js('resources/js/app.js', 'public/js').vue();
    mix.sass('resources/sass/app.scss', 'public/css');
    but now I prefer your following step. Thanks man 💗💗💗

  • @VforVanish
    @VforVanish 3 года назад +1

    Dary, you are the best Laravel teacher out there

    • @codewithdary
      @codewithdary  3 года назад

      Thank you man. There are loads of great content creators out there as well!

  • @Stone_624
    @Stone_624 Год назад +1

    Amazing video, Helped me! Thanks so much!
    Interesting that you need to uninstall laravel-mix to fix this issue. But it worked for me.

    • @codewithdary
      @codewithdary  Год назад

      Probably one of the reasons why Laravel is using Vite now :)

  • @expert_guidesTV
    @expert_guidesTV 2 года назад +1

    DAAARRRYYYY......................YOU ARE THE BEST BRO! YOU JUST GOT A SUBSCRIBER...ONE LOVE

    • @codewithdary
      @codewithdary  2 года назад

      I love to hear that buddy! Thank you.

  • @danb9393
    @danb9393 3 года назад +2

    It worked..... finally.thank u. You save my day

  • @Simonkaabi
    @Simonkaabi 3 года назад +2

    i liked this one, if you have any other tips or methods that are really important. i will be glad to know them as a beginner

    • @codewithdary
      @codewithdary  3 года назад +2

      Thank you, Mohamed. I will keep it in mind!

  • @cristhiangonzalez4980
    @cristhiangonzalez4980 3 года назад +2

    muchisimas gracias mi amigo, me has quitado un tremendo dolor de cabeza.. gracias

  • @charitysimon-peraboh5555
    @charitysimon-peraboh5555 3 года назад

    Hello Mr. Dary, I'm here because the command PHP artisan UI tailwindcss --auth didn't work. After trying bootstrap option, it came with mix not recognize error. Thanks, it worked finally

    • @codewithdary
      @codewithdary  3 года назад +1

      Awesome! :D

    • @charitysimon-peraboh5555
      @charitysimon-peraboh5555 3 года назад

      @@codewithdary Pls sir, there's another error again, the css setting didn't work as expected, I tried going through the css file to correct the settings with my little css knowledge, not all worked, any help with this?

  • @hugoresende5620
    @hugoresende5620 2 года назад +1

    Nice one bro i am doing your tutorials and had this issue for a while, always says mix not found... sweet :)

    • @codewithdary
      @codewithdary  2 года назад

      You love to see it Hugo! Thanks!

  • @hasinaparveen5009
    @hasinaparveen5009 2 года назад +1

    thank you so much sir this is very helpful for me😊

  • @mustafabaki275
    @mustafabaki275 3 года назад

    Worked like a charm. Thank you! Keep it up!

  • @EgyptianNormie
    @EgyptianNormie 3 года назад +4

    i wish u do more laravel project like e-commerce or any othe project for practice and upload it on free host so we can do that also

    • @codewithdary
      @codewithdary  3 года назад +2

      I will think about it Ahmed! Thanks for sharing your ideas.

  • @ilhammuhamads4706
    @ilhammuhamads4706 2 года назад

    thanks brother, you save my life. but in last command im still error with npm run dev, work with npm run development

  • @Skw384
    @Skw384 3 года назад +2

    Didn't work for me, but you got a subscriber

    • @codewithdary
      @codewithdary  3 года назад +1

      Still the same error? You can run npm audit fix -force and then npm install

    • @Skw384
      @Skw384 3 года назад

      @@codewithdary yup, still the same error even after running audit fix

    • @codewithdary
      @codewithdary  3 года назад

      Did you run the npm install command first, then the npm audit and npm install again?

    • @Skw384
      @Skw384 3 года назад

      @@codewithdary I did yeah, I’ve tried several different solutions that I found on stackoverflow and it always got the same error

    • @mohsin5563
      @mohsin5563 3 года назад

      same bro same fkin error

  • @work-place1845
    @work-place1845 3 года назад +1

    Thank you Dary,

  • @alexischacon4666
    @alexischacon4666 2 года назад +1

    thanks from Colombia.

  • @miftakhusysyiroth9301
    @miftakhusysyiroth9301 3 года назад

    Thank you million, sir. You saved my holiday

  • @basitafridi7505
    @basitafridi7505 3 года назад +1

    this video was very helpful to me. but if you don't to use frontend-presets and continue with php artisan ui vue --auth then you need to install react only like php artisan ui react and boom you are good to go.

  • @abdallakaram5376
    @abdallakaram5376 3 года назад +2

    very very nice you help me 💖

  • @furomin4272
    @furomin4272 3 года назад +1

    Not sure but you actually installed React with Bootstrap 4 (as you can see in the compiled css). Just to clear this out... I don't think there is an easy way to install React with Tailwind, the only way I could think of would be to install the Tailwind presets and install React manually on top of that. Despite of that, thanks for the videos!!!

    • @codewithdary
      @codewithdary  3 года назад +1

      No, your completely right. I tried to show what would happen if you pull in both or one. The error will remain the same! Thank you for sharing your knowledge!

  • @jamespada9724
    @jamespada9724 3 года назад

    Thank you very much, you made my day wonderful

  • @benbamba2751
    @benbamba2751 2 года назад +1

    THANKS THANKS THANKS, your video is superbe

  • @sanghoonkim339
    @sanghoonkim339 3 года назад +1

    Thank you!!! I've solved..😂👍

  • @user-febri411
    @user-febri411 Год назад +1

    thank you this works for me

    • @codewithdary
      @codewithdary  Год назад

      Wow, happy that this is still helpful :)

  • @luizsoares4847
    @luizsoares4847 3 года назад

    Hello. I've been getting this error that I can not seem to be able to solve. Regular expression Denial of Service. It seems to be because of the postcss. I've searched a lot of stuff on internet but could not find anything to help me fix it. Can u help me?

  • @Lol-ke3kg
    @Lol-ke3kg 2 года назад

    sir I am getting error while using yarn run dev (next js) please help sir.

  • @hassankhan-rt1qh
    @hassankhan-rt1qh 2 года назад

    Hi, Darry I was watching your larval series which has 34 videos. When I reached " how to compile assets video ". I faced this error. Now I followed all steps like u but I still faced the same error when i executed the command "npm install && npm run dev " at the last. after following all steps I checked the public folder, there are no CSS or js folders under the public folder. Plz help me I shall be thankful to you for this act of kindness

  • @padepokanit8205
    @padepokanit8205 3 года назад +1

    i like this,,, solved thnks bro !!

  • @csaltlatte
    @csaltlatte 3 года назад +1

    I'm getting a public key error when I run "npm install laravel-mix --save-dev"

    • @codewithdary
      @codewithdary  3 года назад +1

      This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix: help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

  • @amanraj8293
    @amanraj8293 3 года назад

    [webpack-cli] TypeError: mix.js is not a function
    How to solve this..please help

  • @MarcelloPato
    @MarcelloPato Год назад +1

    Hey man! Thanks for the video. I have an old application using Laravel 5.8 that I'm restart to use and I'm facing this exactly issue. I did what you said, it does install ok, but still not working when running npm run dev. I'll try to paste the error here, or just a little part:
    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 2
    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.
    Let me show you some versions:
    npm -v: 6.13.4
    nvm -v: 6.39.2
    node -v: v8.17.10
    macOS High Sierra 10.13
    Do you have any ideas or a solution? Thanks and sorry for the long comment
    😶

    • @codewithdary
      @codewithdary  Год назад +1

      I recommend you to not spin up a Laravel 5.8 version at all. It uses PHP 7.1.3, which has not been supported for a long time.

    • @MarcelloPato
      @MarcelloPato Год назад

      Maybe I should upgrade to v6?

    • @codewithdary
      @codewithdary  Год назад +1

      @@MarcelloPato you know Laravel is already spinning up version 9s right?

    • @MarcelloPato
      @MarcelloPato Год назад

      Yeah, but it is a long way from 5.8 to 9.

    • @codewithdary
      @codewithdary  Год назад +1

      @@MarcelloPato it’s the same process as 5.8 to any other. It doesn’t make a difference. You should refactor the code into a new project

  • @GergelyCsermely
    @GergelyCsermely 3 года назад +1

    Thanks was very interesting

  • @prakharmishra7697
    @prakharmishra7697 3 года назад +1

    In my setup, npm deleted automatically after running php artisan ui tailwindcss --auth or npm install

  • @arazibrahim7416
    @arazibrahim7416 2 года назад +1

    Thanks man.

  • @Bebe-sg4mg
    @Bebe-sg4mg 3 года назад +1

    That is awesome..u r great

  • @hindhilali2307
    @hindhilali2307 3 года назад +1

    When I write npm install & & npm run dev=====> it say (& &) is not a valid statement separator in this version 🙄🙄⁉️⁉️⁉️⁉️⁉️

    • @codewithdary
      @codewithdary  3 года назад

      You have a space in-between which is not needed

    • @hindhilali2307
      @hindhilali2307 3 года назад

      @@codewithdary I didn't wrote this space in powershell

    • @codewithdary
      @codewithdary  3 года назад

      then you should run them separately.

    • @hindhilali2307
      @hindhilali2307 3 года назад

      @@codewithdary it say that the npm is undefined..

  • @okuimeh7635
    @okuimeh7635 2 года назад +1

    Good job

  • @jacobrodriguezcardenete4232
    @jacobrodriguezcardenete4232 2 года назад

    Really helpfull. Thanks.

  • @sheikhjaber7453
    @sheikhjaber7453 3 года назад +1

    In my case there are 34 vulnerabilities. But in the end after running npm install && npm run dev twice, it gets compiled successfully. But tailwind isn't working :(

    • @MandeMediaSoftwares
      @MandeMediaSoftwares 3 года назад +2

      execute this 2 extra commands and it will work fine
      npm cache clear --force
      npm install
      npm run dev

  • @InstantFunnyShorts
    @InstantFunnyShorts 2 года назад +1

    Not working, still getting error after running last command

  • @sonaligoriwale8329
    @sonaligoriwale8329 3 года назад

    I hv gotta 2 vulnerabilities while removing laravel-mix. Hence cld nt install & run npm successfully

  • @majdibrahem5586
    @majdibrahem5586 3 года назад +1

    thanks broo, it does work

  • @headlikeahole6548
    @headlikeahole6548 3 года назад

    "php artisan ui tailwindcss --auth" command adds an older version of laravel-mix (5.0 or something) to package.json file. Before running "npm install" manually change version to 6.0.18 in package.json (or whatever the latest version at the moment of reading this comment) and then run "npm install" so the latest version of laravel-mix is installed. This solved the issue for me.

  • @shad7365
    @shad7365 3 года назад

    thanks bro i have solve my problem

  • @aazero1011
    @aazero1011 2 года назад

    This didn't work for me, I keep getting this message: Error: Unknown option '--hide-modules'

  • @sholehagung1591
    @sholehagung1591 3 года назад +1

    Thank's its wort it

  • @smartinex
    @smartinex 3 года назад

    it doesn't work for me! and i'm still looking for a solution :((

  • @5minutestech481
    @5minutestech481 3 года назад +1

    I got error when i run command npm run dev

    • @codewithdary
      @codewithdary  3 года назад

      Might be good to mention which one ;)

  • @funstudio3409
    @funstudio3409 3 года назад

    finally it's work

  • @fahadullah4248
    @fahadullah4248 3 года назад +2

    Better make a complete ecommerce 💖

  • @michealadeyemi7791
    @michealadeyemi7791 2 года назад

    && is not a valid statement separator in this version

  • @maboulmaaly
    @maboulmaaly 3 года назад

    Top top thank you

  • @JonathanMiranda
    @JonathanMiranda 2 года назад

    Hey, just want to came across to say if you are using node -v 14.16.0 you will get this error even if the project it's ok on its structure, so, using a LTS node version works fine!!!
    Long story short: This workaround does not work for me
    Thanks!

  • @nafisnawalnahiyan5032
    @nafisnawalnahiyan5032 2 года назад

    You are the best

  • @laminediop2288
    @laminediop2288 3 года назад

    thanks

  • @ghazianhamdi5165
    @ghazianhamdi5165 3 года назад

    damn bro, thx verry much

  • @bluemoon6988
    @bluemoon6988 3 года назад

    I am a total beginner and trying to do my first practice project ..and I have a error like this…Can someone help me with this, Please!😅😂
    I already installed node.js too. But it didn't work
    The Mix manifest does not exist.
    npm run install
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + npm run install
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    npm install laravel-mix --save-dev
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + npm install laravel-mix --save-dev
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    npm remove laravel-mix
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + npm remove laravel-mix
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @iUmerFarooq
    @iUmerFarooq 3 года назад +1

    Love from Pakistan ❤

  • @jonathanmarquez1511
    @jonathanmarquez1511 3 года назад +1

    I still have the same problem...
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\chokidar
    ode_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
    audited 1207 packages in 23.407s
    97 packages are looking for funding
    run `npm fund` for details
    found 35 moderate severity vulnerabilities
    run `npm audit fix` to fix them, or `npm audit` for details
    > @ dev C:\Users\t-ott\OneDrive\Escritorio\superate_mensajeria
    > npm run development
    > @ development C:\Users\t-ott\OneDrive\Escritorio\superate_mensajeria
    > mix
    × Mix
    Compiled with some errors in 17.14s
    ERROR in ./resources/js/components/ExampleComponent.vue 1:0
    Module parse failed: Unexpected token (1:0)
    You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See webpack.js.org/concepts#loaders
    >
    |
    |
    webpack compiled with 1 error
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ development: `mix`
    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! C:\Users\t-ott\AppData\Roaming
    pm-cache\_logs\2021-05-13T03_45_06_687Z-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! C:\Users\t-ott\AppData\Roaming
    pm-cache\_logs\2021-05-13T03_45_06_869Z-debug.log

  • @golammuktadir4355
    @golammuktadir4355 2 года назад

    Please check this. What type of problem is this
    =======================
    ❯ nvm --version
    0.35.3
    ❯ node -v
    v12.14.0
    ❯ npm --version
    6.13.4
    ❯ cd /opt/lampp/htdocs/laravel/school
    ❯ npm remove laravel-mix
    npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
    npm ERR! Unexpected end of JSON input while parsing near '...n-transform-block-sco'
    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/gm/.npm/_logs/2022-05-02T06_35_11_027Z-debug.log
    ❯ npm install laravel-mix --save-dev
    npm ERR! Unexpected end of JSON input while parsing near '...n-transform-block-sco'
    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/gm/.npm/_logs/2022-05-02T06_35_28_917Z-debug.log
    ❯ npm install cross-env --save-dev
    npm notice created a lockfile as package-lock.json. You should commit this file.
    + cross-env@7.0.3
    added 7 packages from 5 contributors and audited 7 packages in 1.689s
    found 0 vulnerabilities
    ❯ npm install && npm run dev
    npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
    npm ERR! Unexpected end of JSON input while parsing near '...n-transform-block-sco'
    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/gm/.npm/_logs/2022-05-02T06_36_12_743Z-debug.log
    ======================
    Thanks in advance sir

  • @IvanEliasCarrascoLupinta
    @IvanEliasCarrascoLupinta 3 года назад

    thanks

  • @fahadullah4248
    @fahadullah4248 3 года назад

    Better make a complete ecommerce 💖