Vue 과정오류

강경인·2023년 5월 2일

1. npm run serve 오류

아래 과정을 거친후에

$ npm install -g @vue/cli

SSAFY@DESKTOP-DOGVPUB MINGW64 ~/Desktop/새 폴더 (4)
$ vue create vue-cli


Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 2] babel, eslint)


Vue CLI v5.0.8
✨  Creating project in C:\Users\SSAFY\Desktop\새 폴더 (4)\vue-cli.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...


added 855 packages, and audited 856 packages in 14s

92 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
🚀  Invoking generators...
📦  Installing additional dependencies...


added 92 packages, and audited 948 packages in 3s

105 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
⚓  Running completion hooks...

📄  Generating README.md...

🎉  Successfully created project vue-cli.
👉  Get started with the following commands:

 $ cd vue-cli
 $ npm run serve


SSAFY@DESKTOP-DOGVPUB MINGW64 ~/Desktop/새 폴더 (4)
$ cd vue-cli/

아래의 오류가 떴다.

SSAFY@DESKTOP-DOGVPUB MINGW64 ~/Desktop/새 폴더 (4)/vue-cli (master)
$ npm run serve

> vue-cli@0.1.0 serve
> vue-cli-service serve

 INFO  Starting development server...


 ERROR  Failed to compile with 1 error                                                                 오전 9:17:02

 error 

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

문제원인은 폴더에 기호와 특수문자가 들어간것이 원인이었다.
이것도 안되면
node_modules/html-webpack-plugin/index.js 파일안에서 index.html 검색해서 이름을 index2.html 로 수정(49번째줄)

이렇게 바꾸면

http://localhost:8080/index2.html 이렇게 뒤에 2를 붙여서 접속

0개의 댓글