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.

Stuck at 95% Emitting

See original GitHub issue

Environment:

  • Laravel Mix Version: 1.4.2
  • Node Version: 6.11.2
  • NPM Version: 5.3.0
  • OS: Windows 7 (Using WAMP)

Description:

I’ve let this issue sit for awhile, as I’ve been researching the issues on this repository to fix things myself, and I can’t for the life of me get this to work.

Essentially, on both my working project, and a brand new Laravel installation (5.4.33), when I run:

npm run dev

it looks like it’s working, but then it sits at 95% emitting.

Here’s my console output:

F:\Links\www\laravel\54>npm run dev

> @ dev F:\Links\www\laravel\54
> npm run development

npm WARN invalid config loglevel="notice"

> @ development F:\Links\www\laravel\54
> 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

I tried waiting awhile, in hopes that it’s just being really slow, but I gave up after 5 minutes of nothing new (From all of the benchmarks I’ve heard about, this really shouldn’t take longer than 8 to 10 seconds).

Steps To Reproduce:

  1. Be on my computer (Because you probably won’t have this issue)
  2. Install a new Laravel project
  3. Run npm install (or yarn install)
  4. Run npm run dev

Additional Details:

I did this using a fresh Laravel install, so my package.json and webpack.mix.js come straight from the source code. I’ve also tried this over the past three or four weeks on my working project, but I’ve never once gotten this to fully work.

I think that this might be JavaScript related. If I comment out the compilation of JavaScript, and just run the sass mixer, I’m able to run everything correctly (This just means I have to do my JavaScript the old fashioned way).

Here’s the output:

F:\Links\www\laravel\54>npm run dev

> @ dev F:\Links\www\laravel\54
> npm run development

npm WARN invalid config loglevel="notice"

> @ development F:\Links\www\laravel\54
> 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

DONE  Compiled successfully in 3421ms                                                                                                                                                              
5:39:01 PM


                                                                                                    Asset     Size  Chunks             Chunk Names
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1  20.1 kB          [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb    18 kB          [emitted]
 fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158  23.4 kB          [emitted]
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512  45.4 kB          [emitted]
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760   109 kB          [emitted]
                                                                                                   mix.js   177 kB       0  [emitted]  mix

Also, I my working project, I’ve gotten all of my custom JS scripts to compile using the mix.scripts() method, which makes me believe that this issue is exclusive to the mix.js() method.

I’m open to any ideas that might work, just know that I’ve already tried the following:

  • Reinstalling node and npm
  • Reinstalling all node_modules dependencies
  • Using a fresh installation of Laravel
  • Changing the public path (Even though I shouldn’t have to)
  • Disabling image loader options
  • Restarting my computer (Because that’s the general IT response)

(Edit) Diagnosis:

With the help of the commenters below, we’ve discovered that my issue running npm run dev using Command Prompt (on a Windows environment), where the current directory of the prompt is relying on a Symbolic Link. When running the same command without routing through the Symbolic Link, the command runs just fine.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:22
  • Comments:33 (2 by maintainers)

github_iconTop GitHub Comments

181reactions
wouterrutgerscommented, Aug 29, 2017

By doing some trial and error I’ve found out there is a check in index.js which sets the Config.publicPath to public if it detects a Laravel app.

I’m using mix in a standalone project so it skips that part, but by manually setting my public path to public it started to work.

You might want to look into this and see if manually setting the public path by using mix.setPublicPath('public') resolves this issue for you as well.

19reactions
cmosguycommented, Sep 21, 2017

Hi All and @JeffreyWay ,

I finally figured out why my npm run watch command was choking at 95%.

The story is this: I am using Windows 10. I have a directory called c:\w\myproject which is a “Junction Link” that I created (its similar to a symbolic link in unix world). This c:\w\myproject is a symbolic link to c:\nobackup\w\myproject. What happens Jeff’s laravel-mix does not resolve the output directory paths to public properly.

My fix: I have to first do cd c:\noback\w\myproject then run npm run watch and viola, it worked!

Cheers! Adam

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack hangs at on "95% emit" / "95% emitting"
I then saw it got stuck in mkdirp so added a console.log in the function in that node module to see what path...
Read more >
yarn serve stuck at "95% emitting CopyPlugin" #4252 - GitHub
What is actually happening? stuck at 95% emitting CopyPlugin. My need is simple, I want to serve files belong to a folder as...
Read more >
Developers - Stuck at 95% Emitting - - Bountysource
it looks like it's working, but then it sits at 95% emitting. Here's my console output: F:\Links\www\laravel\54>npm run dev > @ dev ...
Read more >
angular/angular-cli - Gitter
any solution for 95% emitting CopyPluginKilled error (version 7)?. Albert Montagut Casero. @AlbertMontagutCasero. when i update an array? all my *ngfor that ...
Read more >
React app built with webpack-dev-server stuck on deploy?
... 1.02 KiB [emitted] > 5:52:29 PM: main.js 4.26 MiB main [emitted] [big] main > 5:52:29 PM: Entrypoint main [big] = main.js >...
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