Level 10
Did you do npm install first before running npm run watch?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Im using a VM on Win and tried using "gulp watch" when this error popped up:
"No gulpfile found"
So i read around and found i could use "npm run watch" ... with this i got a greater error:
> @ watch /home/test/PhpstormProjects/myNewProject
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
module.js:328
throw err;
^
Error: Cannot find module '/home/test/PhpstormProjects/myNewProject/node_modules/laravel-mix/setup/webpack.config.js'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at requireConfig (/home/test/PhpstormProjects/myNewProject/node_modules/webpack/bin/convert-argv.js:96:18)
at /home/test/PhpstormProjects/myNewProject/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
at module.exports (/home/test/PhpstormProjects/myNewProject/node_modules/webpack/bin/convert-argv.js:107:15)
at Object.<anonymous> (/home/test/PhpstormProjects/myNewProject/node_modules/webpack/bin/webpack.js:155:40)
at Module._compile (module.js:410:26)
npm ERR! Linux 4.8.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/test/PhpstormProjects/myNewProject/npm-debug.log
I already tried installing gulp with "--no-bin-links" and "--save-dev". Gulp is also installed globally.
I just needed to sudo npm install --no-bin-links and create my own gulpfile.js´.
Please or to participate in this conversation.