Show us, how you inserted jquery-3.1.1.min.js to view.
Did you close <script> tag properly?
npm run watch stucks also?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey everyone,
This is our first time using Laravel Mix and Webpack.
We're creating a brand new project and just installed Laravel's latest version.
We're just testing the waters and created a very simple webpack.mix.js file:
const mix = require('laravel-mix');
mix.js('resources/js/jquery-3.1.1.min.js', 'public/js');
When we run "npm run dev", this is what we get:
> @ dev /home/mhdev/maplemain
> npm run development
> @ development /home/mhdev/maplemain
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
Nothing else happens even after 10 minutes. We never had this run successfully before but we don't think it should run for such a long time without feedback, especially considering that it's only 1 simple js file.
We're running npm v6.14.4 and node v12.16.2.
Things we've tried:
rm -rf node_modules package-lock.json
npm cache clear --force
npm install cross-env
npm install
We also tried running it with verbose and it shows:
[mhdev@server20 maplemain]$ npm run dev --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev', '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb run-script [ 'predev', 'dev', 'postdev' ]
npm info lifecycle @~predev: @
npm info lifecycle @~dev: @
> @ dev /home/mhdev/maplemain
> npm run development
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'development' ]
npm info using [email protected]
npm info using [email protected]
npm verb run-script [ 'predevelopment', 'development', 'postdevelopment' ]
npm info lifecycle @~predevelopment: @
npm info lifecycle @~development: @
> @ development /home/mhdev/maplemain
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
No luck.
Since we're so brand new to Mix and Webpack, any and all help will be greatly appreciated!
Thanks in advance!
Please or to participate in this conversation.