A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/webpack/webpack-dev-server/issues/2809 below:

Аfter compilation webpack, it gives an error Watchpack Error (initial scan): Error: EACCES: permission denied · Issue #2809 · webpack/webpack-dev-server · GitHub

Describe the bug

After compilation, errors occur as shown in the screenshot below. Further devServer does not work.

What is the current behavior?

Code
// webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');


module.exports = {
	context: path.resolve(__dirname, 'src'),
	mode: 'development',
	//devtool: false,
	entry: {
		main: './index.js',
		analytics: './analytics.js'
	},
	output: {
		filename: '[name].[contenthash].js',
		path: path.resolve(__dirname, 'dist')
	},
	resolve: {
		extensions: ['.js', '.json', '.png'],
		alias: {
			'@models': path.resolve(__dirname, 'src/models'),
			'@': path.resolve(__dirname, 'src'),
		}
	},
	optimization: {
		splitChunks: {
			chunks: 'all'
		}
	},
	devServer: {
		publicPath : '/' 
	},
	module: {
		rules: [
			{
				test: /\.css$/,
				use: [ 'style-loader','css-loader' ],
			},
			{
				test: /\.(png|jpg|svg|gif)$/,
				use: [ 'file-loader' ],
			},
			{
				test: /\.(ttf|woff|woff2|eot)$/,
				use: [ 'file-loader' ],
			},
			{
				test: /\.xml$/,
				use: [ 'xml-loader' ],
			},
			{
				test: /\.csv$/,
				use: [ 'csv-loader' ],
			},
		],
		
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: './index.html',
			title: 'webpack5'
		}),
		new CleanWebpackPlugin({
			verbose: true,
			cleanOnceBeforeBuildPatterns: [path.resolve(__dirname, 'dist')],
		}),
	]
}
// package.json
{
	"name": "webpack5",
	"version": "1.0.0",
	"description": "",
	"private": true,
	"scripts": {
		"dev": "webpack --mode development",
		"build": "webpack --mode production",
		"start": "webpack serve --mode development"
	},
	"author": "alex",
	"license": "ISC",
	"devDependencies": {
		"clean-webpack-plugin": "^3.0.0",
		"css-loader": "^5.0.0",
		"csv-loader": "^3.0.3",
		"file-loader": "^6.2.0",
		"html-webpack-plugin": "^5.0.0-alpha.7",
		"papaparse": "^5.3.0",
		"path": "^0.12.7",
		"sass-loader": "^10.0.4",
		"style-loader": "^2.0.0",
		"webpack": "^5.3.2",
		"webpack-cli": "^4.1.0",
		"webpack-dev-server": "^3.11.0",
		"xml-loader": "^1.2.1"
	},
	"dependencies": {
		"jquery": "^3.5.1",
		"normalize.css": "^8.0.1"
	}
}
Expected Behavior Actual Behavior For Bugs; How can we reproduce the behavior?

Steps to reproduce the behavior:

Define a devServer config in your webpack config file
Run npm run start
Expected behavior

For Features; What is the motivation and/or use-case for the feature?

mnpenner, heytulsiprasad, pustomytnyk, steamhammer, TravelFiend and 3 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4