question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue version 5.0.1. After downloading, run NPM run serve to report an error

See original GitHub issue

Version

5.0.1

Environment info

node-v14.19.0-x64
vue cli 5.0.1
vue 2.6.14

Steps to reproduce

Follow the normal installation steps, and then report an error when running NPM run serve: Conflict: Multiple assets emit different content to the same filename index. html ERROR in Conflict: Multiple assets emit different content to the same filename index. html webpack compiled with 1 error

What is expected?

How to solve it?

What is actually happening?

Conflict: Multiple assets emit different content to the same filename index.html ERROR in Conflict: Multiple assets emit different content to the same filename index.html webpack compiled with 1 error

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

7reactions
GustinLaucommented, Mar 17, 2022

May be your project path has a special symbol like ‘(’ or ‘)’. I’m not sure if it’s a bug of copy-webpack-plugin or fast-glob, because cli will add the absolute path of the index.html in the public folder to the ignore list, if the path has a special symbol, copy-webpack-plugin will not match the path and will not ignore it. Therefore index.html will emit twice. You can rename your project path or add follow code in chainWebpack function to solve it.

config.plugin('copy').tap(args => {
    const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
    const publicDir = path.resolve(process.VUE_CLI_SERVICE.context, 'public').replace(/\\/g, '/');
    const escapePublicDir= publicDir.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
    args[0].patterns[0].globOptions.ignore = args[0].patterns[0].globOptions.ignore.map(i => i.replace(publicDir, escapePublicDir));
    return args;
});
4reactions
squivixcommented, Mar 17, 2022

May be your project path has a special symbol like ‘(’ or ‘)’

tested with and without parenthesis in path. You are correct. This is seems to be the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error when I run npm run server on Vue JS project
First Run npm uninstall @vue/cli-plugin-pwa in terminal then Run npm i -D @vue/cli-plugin-pwa@4 this will install latest release of version ...
Read more >
webpack-dev-server - npm
Used when loading multiple configurations. -o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/. --stats [ ...
Read more >
Installation | Vue CLI
To install the new package, use one of the following commands. You need administrator privileges to execute these unless npm was installed on ......
Read more >
Vue JavaScript Tutorial in Visual Studio Code
vue file (Ctrl+S), restart the server with npm run serve and you'll see "Hello World!". Leave the server running while we go on...
Read more >
error:0308010c:digital envelope routines::unsupported [Node ...
you're not using the LTS (long term support) version of Node JS. ... file by running rm –rf package.lock.json; run npm install or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found