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.

npm run hot on Homestead box. Assets not found.

See original GitHub issue
  • I created a new Laravel 5.4 project
  • Updated my homestead yaml and added domain.dev to my hosts file. Provision box.

Open browser. Site works as expected on domain.dev.

Modified the homepage blade view to use <script src="{{ mix('js/app.js') }}"></script> Ran npm run hot

I get

Project is running at http://localhost:8080/
webpack output is served from http://localhost:8080/
404s will fallback to /index.html
DONE  Compiled successfully in 5612ms

I see the hot file in the /public folder.

Refresh the browser. In the console I see:

GET http://localhost:8080/js/app.js 404 (Not Found)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12

github_iconTop GitHub Comments

3reactions
plakhincommented, Feb 25, 2017

I’ve solved this by adding --output-public-path http://app.dev/ --host app.dev to hot script in package.json

I’ve also replaced ? new HtmlString("http://localhost:8080{$manifest[$path]}") with ? new HtmlString(app('config')->get('app.url').":8080{$manifest[$path]}") in helpers.

@JeffreyWay First of all, thank you for your great work! It would be nice to see something like this solution out of the box in future releases.

2reactions
trognecommented, Jan 20, 2019

Any of this is not working anymore. Can someone provide a real solution ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run hot on Homestead box. Assets not found. #300 - GitHub
I created a new Laravel 5.4 project Updated my homestead yaml and added domain.dev to my hosts file. Provision box. Open browser.
Read more >
Error (es2015 not found) running "npm run dev" on a laravel ...
Struggling with Laravel 5.4 vagrant box on Windows 10, trying to get laravel-mix to work. My end goal is to set up a...
Read more >
npm run hot on Homestead box. Assets not found. - - Bountysource
I created a new Laravel 5.4 project; Updated my homestead yaml and added domain.dev to my hosts file. Provision box. Open browser. Site...
Read more >
Help, can't install laravel mix in laravel homestead. - Laracasts
I'm running sudo npm install --no-bin -links in a fresh laravel homestead install inside my linux VM (Virtual Box). If this will help...
Read more >
One Setup to Rule Them All: Vagrant + Laravel Mix + ...
The first was our switch to Laravel Mix from our home-grown set of Gulp tasks rolled into an npm package. The second, was...
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