question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: src.forEach is not a function with laravel-mix@0.6.0

See original GitHub issue

What I did yarn upgrade laravel-mix from version 0.5.9 to version 0.6.0 Then I run npm run dev

What was expected To be able to bundle the assets without errors, like when using v.0.5.9 (provided the same webpack.mix.js and webpack.config.js file)

What I get The following TyperError

/home/user/.nvm/versions/node/v7.4.0/bin/node /home/user/.nvm/versions/node/v7.4.0/lib/node_modules/npm/bin/npm-cli.js run dev

> @ dev /home/user/webApps/apptree2
> node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

/home/user/webApps/apptree2/node_modules/laravel-mix/src/index.js:139
    src.forEach(file => {
        ^

TypeError: src.forEach is not a function

Other steps I run yarn add laravel-mix@0.5.9 and subsequently npm run dev and the process successfully finished with exit code 0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adriaanzoncommented, Feb 2, 2017

In this case, mix.copy() instead of mix.combine() would have been more fitting

0reactions
iraklisgcommented, Feb 3, 2017

@JeffreyWay I just opened a new issue #284 requesting this feature 😛 Hopefully someone could provide some help with this

Read more comments on GitHub >

github_iconTop Results From Across the Web

src.forEach is not a function with laravel-mix@0.6.0 · Issue #255
TypeError : src.forEach is not a function with laravel-mix@0.6.0 #255 ... both mix.copy() and mix.combine() are not a solution.
Read more >
Why Npm run watch giving to me TypeError: text.forEach is not ...
js for Laravel project. Everything was fine until I tried to run npm run watch in my terminal. Js assets are emitted. But,...
Read more >
TypeError: text.forEach is not a function - Laracasts
This error happens when my webpack.mix.js is the original installation. Looks the same as this ... https://www.bountysource.com/issues/92161278-unexpectedly ...
Read more >
Compiling Assets (Mix) - The PHP Framework For Web Artisans
Introduction. Laravel Mix provides a fluent API for defining Webpack build steps for your Laravel application using several common CSS and JavaScript pre- ......
Read more >
npm run dev is showing error on existing Laravel Project
Also if change require to import. Then I get mix.options is not a function. (basically none of the mix function are getting called.)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found