Stuck at 95% Emitting
See original GitHub issueEnvironment:
- 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:
- Be on my computer (Because you probably won’t have this issue)
- Install a new Laravel project
- Run
npm install
(oryarn install
) - 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
andnpm
- 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:
- Created 6 years ago
- Reactions:22
- Comments:33 (2 by maintainers)
Top GitHub Comments
By doing some trial and error I’ve found out there is a check in
index.js
which sets theConfig.publicPath
topublic
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.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 toc:\nobackup\w\myproject
. What happens Jeff’slaravel-mix
does not resolve the output directory paths topublic
properly.My fix: I have to first do
cd c:\noback\w\myproject
then runnpm run watch
and viola, it worked!Cheers! Adam