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.

`mix.extract()` causing the resources processing to freeze with `95% emitting` message

See original GitHub issue
  • Laravel Mix Version: 1.0.3 (npm list --depth=0)
  • Node Version (node -v): 6.10.3
  • NPM Version (npm -v): 5.0.3
  • OS: Windows 8.1
npm list --depth=0

+-- axios@0.15.3
+-- bootstrap-sass@3.3.7
+-- cross-env@3.2.4
+-- jquery@3.2.1
+-- laravel-mix@1.0.3
+-- lodash@4.17.4
`-- vue@2.3.4

npm ERR! peer dep missing: webpack@^2.2.0, required by extract-text-webpack-plugin@2.1.2
npm ERR! peer dep missing: webpack@^2.2.0, required by webpack-dev-server@2.5.0

Description:

Hi artisans,

Can anybody confirm this (Especially on Windows) or am i the only one who have this issue !!

Steps To Reproduce:

Start with a new laravel installation

Edit the webpack.mix.js file like this

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

mix.sass('resources/assets/sass/front/app.scss', 'public/css')
   .sass('resources/assets/sass/back/admin.scss', 'public/css')
   .options({
       processCssUrls: false,
   });

mix.autoload({
    jquery: ['$', 'window.jQuery', 'jQuery']
});

mix.js('resources/assets/js/app.js', 'public/js');

mix.extract([
    'axios', 'vue', 'jquery', 'bootstrap-sass',
], '/assets/js/vendors.js');

After that run: npm run dev

λ npm run dev

> @ dev d:\...\test-mix
> npm run development

npm WARN invalid config loglevel="notice"

> @ development d:\...\test-mix
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 95% emitting

And if you comment the mix.extract([...], '/assets/js/vendors.js');, the build pass !!

Also, i want to point something weird with mix-manifest.json:

{
    "/d:/assets/js/vendors.js": "/d:/assets/js/vendors.js",
    "/js/app.js": "/js/app.js",
    "/css/app.css": "/css/app.css",
    "/css/admin.css": "/css/admin.css",
    "/js/manifest.js": "/js/manifest.js"
}

I think the first line "/d:/assets/js/vendors.js": "/d:/assets/js/vendors.js", is invalid because it starts with /d:/assets !!

Issue Analytics

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

github_iconTop GitHub Comments

13reactions
taaicommented, Jul 3, 2017

I use Laravel Mix also for non-Laravel projects where is no artisan file which, apparently, is being used by Laravel Mix to detect Laravel (in which case publicPath is being set to public automatically). I was struggling with this issue after upgrading from version 0.8.8 to version 1.0.7 until I found out what was the cause of that 95% emitting message.

So, yes, @PascaleBeier is [almost] right, you should set publicPath like this:

mix
.options({
    publicPath: 'public'
})
8reactions
PascaleBeiercommented, Jul 1, 2017

@arcanedev-maroc

mix.setPublicPath('./'); solves this for me - can you confirm?

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack hangs at on "95% emit" / "95% emitting"
In my case (Windows environment and laravel-mix) there weren't any incorrect ... Using @ngtools/webpack and AotPlugin made it freeze at 95%.
Read more >
A Practical Guide to Frozen Section Technique
The aim is to freeze the specimen as fast as possible to eliminate ice crystal for- mation (freeze artifact). To achieve fast freezing...
Read more >
Chapter 4 — Global Warming of 1.5 ºC - IPCC
An IPCC Special Report on the impacts of global warming of 1.5°C above pre-industrial levels and related global greenhouse gas emission pathways, in...
Read more >
Meat Processing Technology for small to medium scale ...
Meat processing has always been part of FAO's livestock programmes, not only because of the possibility of fabricating nutrient-rich products for human food, ......
Read more >
40 CFR Part 136 -- Guidelines Establishing Test Procedures ...
4 U.S. Geological Survey Techniques of Water-Resource Investigations, Book 5, Laboratory Analysis, Chapter A4, Methods for Collection and Analysis of ...
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