I'm getting an error on my command prompt when I type 'npm run dev'.
This is the first time I've tried to type in npm run dev, so the error has been happening from the beginning.
To reproduce this error I just type in 'npm run dev' into the command prompt.
I expect typing in npm run dev to create a bundle.js file in the file folder I'm currently in.

I'm not sure what webpack cli info is.
The context of this error is that I'm watching a paid for online video tutorial from udemy.
If you need any more info let me know.
Thanks for the help!
@rostaryms please next time do not remove the template or we'd need to close the issue.
Could you please fill the original template and provide a repo to reproduce (config file, version of webpack and webpack cli). I think this is a problem with your webpack config file
Replying to your doubt,
I'm not sure what webpack cli info is.
@webpack-cli/info is a npm package that outputs versions of webpack and webpack-cli. If you don't feel like installing it, please attach output of following commands.
npx webpack --version
Also we need minimum reproducible repository as @ematipico suggested to work on the issue.
@rostaryms please next time do not remove the template or we'd need to close the issue.
Could you please fill the original template and provide a repo to reproduce (config file, version of webpack and webpack cli). I think this is a problem with your webpack config file
Yes next time I can keep the template paragraphs within the issue post, sure.
As for providing a repo to reproduce, a config file, a version of webpack, and webpack cli, I'm not sure how to show those things. I'll have to do some research before I can provide that for you. Let me try now.
Replying to your doubt,
I'm not sure what webpack cli info is.
@webpack-cli/infois a npm package that outputs versions ofwebpackandwebpack-cli. If you don't feel like installing it, please attach output of following commands.npx webpack --versionAlso we need minimum reproducible repository as @ematipico suggested to work on the issue.
I'll have to research what a repository is before I give you one. Let me try that now.
Here is the result of typing in npx webpack --version:
C:\Users\rosta\Documents\JavaScript_Build_Real_Projects_2020\9-forkify>npx webpack --version
C:\Users\rosta\Documents\JavaScript_Build_Real_Projects_2020\9-forkify\node_moduleswebpack-cli\bin\config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (C:\Users\rosta\Documents\JavaScript_Build_Real_Projects_2020\9-forkify\node_modules\[4mwebpack-cli[24m\bin\config-yargs.js:89:48)
at C:\Users\rosta\Documents\JavaScript_Build_Real_Projects_2020\9-forkify\node_modules\[4mwebpack-cli[24m\binwebpack.js:60:27
at Object.
[90m at Module._compile (internal/modules/cjs/loader.js:1144:30)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:993:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:892:14)[39m
[90m at Module.require (internal/modules/cjs/loader.js:1033:19)[39m
[90m at require (internal/modules/cjs/helpers.js:72:18)[39m
at Object.
C:\Users\rosta\Documents\JavaScript_Build_Real_Projects_2020\9-forkify>
It's really difficult to debug your issue without having a repository to reproduce the issue and without config file.
Closing. Feel free to open a new issue one you have a repo.
Late to the party but I'm in the same course and encountered a similar issue. Having a more up-to-date webpack-cli npm install webpack-cli@3 --save-dev worked for me.
Also in the Udemy course, MacOS 10.14. With @ danlafreniere's suggestion to update, I'm still unable to run npm run dev and am receiving new error messages. Specifically:
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: 7b2687bf27424b83f3d2
Version: webpack 4.44.2
Time: 36ms
Built at: 10/25/2020 3:40:31 PM
ERROR in Entry module not found: Error: Can't resolve './src/js/index.js' in '/Users/Zeesy/Documents/EDUCATION/complete-javascript-course-master/9-forkify'
npm ERR! code 2
npm ERR! path /Users/Zeesy/Documents/EDUCATION/complete-javascript-course-master/9-forkify
npm ERR! command failed
npm ERR! command sh -c webpack
Log attached here 🤷♂️
Most helpful comment
Late to the party but I'm in the same course and encountered a similar issue. Having a more up-to-date webpack-cli
npm install webpack-cli@3 --save-devworked for me.