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 fails with copy ()

See original GitHub issue

Sample mix config:

This works with npm run hot

mix.js('resources/assets/js/app.js', 'public/js/app.js')
   .sass('resources/assets/sass/app.scss', 'public/css/app.css')

This doesn’t work with npm run hot and fails with unspecified error

mix.js('resources/assets/js/app.js', 'public/js/app.js')
   .sass('resources/assets/sass/app.scss', 'public/css/app.css')
   .copy ('resources/tmp', 'public/tmp'); 
 ERROR  Failed to compile with 1 errors

 error

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:15
  • Comments:9

github_iconTop GitHub Comments

2reactions
JeffreyWaycommented, Apr 20, 2017

Fixed in 329ed0ccffb51d52111ec11359f2617c528c60c0.

1reaction
TiBianModcommented, Apr 12, 2017

Temporary solution disable mix.copy when you running npm run hot

if (! mix.config.options.hmr) {
    mix.copy('path/from', 'path/to');
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Npm run hot fails with copy () · Issue #313 - GitHub
Running npm run dev does work properly. I already tried to copy single files and directories. Also when I try to both relative...
Read more >
npm run dev fails : ValidationError: Invalid options object
This is not an issue with webpack or webpack-dev-server itself, but with the copy-webpack-plugin plugin. With the update to the 6.x major ...
Read more >
"npm run hot" fails to receive “https://localhost:8080/js/app.js ...
I wanted to start learning vue.js. First of all I upgraded Laravel (Remoteserver) from 5.8 to 6 to 7 and finally 8.58. Node...
Read more >
Installation | Laravel Mix Documentation
Begin by installing Laravel Mix through NPM or Yarn, and then copying the example Mix file to your project root. mkdir my-app &&...
Read more >
Asset Bundling (Vite) - The PHP Framework For Web Artisans
You must ensure that Node.js (16+) and NPM are installed before running Vite ... you only need reference them in a @vite() Blade...
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