Я получаю эту ошибку при попытке запустить - npm запустите dev в моей командной строке:
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: af4cfdb00272137cb4d3
Version: webpack 4.41.5
Time: 60ms
Built at: 02/05/2020 10:38:54 AM
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
ERROR in Entry module not found: Error: Can't resolve './src' in 'C:\Users\dahiy\Desktop\Web developer Course\JS - Basics 2\forkit'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! forkify@1.0.0 dev: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the forkify@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Вот так выглядит мой webpack.config. js:
const path = require('path');
module.exports = {
entry:'./src/js/index.js',
output: {
path: path.resolve(__dirname, 'dist/js'),
filename:'bundle.js'
},
mode:'development'
};
Это мой пакет. json:
{
"name": "forkify",
"version": "1.0.0",
"description": "forkify project",
"main": "index.js",
"scripts": {
"dev": "webpack"
},
"author": "Sachin Dahiya",
"license": "ISC",
"devDependencies": {
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"dependencies": {}
}
Я пытался сделать все, чтобы устранить эту ошибку, но не нашел решения для ее устранения. Пожалуйста, помогите мне. Прикрепить скриншот ошибки здесь. ошибка