提问人:tan 提问时间:2/11/2023 更新时间:2/11/2023 访问量:47
yarn deploy [ gh-pages ] : 错误命令失败,退出代码为 1
yarn deploy [ gh-pages ] : error Command failed with exit code 1
问:
我正在尝试构建我的项目,该项目运行良好,但是当我尝试使用时出现以下错误:gh-pages
yarn deploy
yarn deploy
yarn run v1.22.19
$ npm run build
> [email protected] build
> react-scripts build
Creating an optimized production build...
Failed to compile.
Error: Parse Error: <script defer src=".""/static/js/main.cc97512a.js"></script><link href=".""/static/css/main.7a4eabc2.css" rel="stylesheet"></head>
<body>
<div id="root"></div>
<div id="overlay"></div>
<div id="animation"></div>
</body>
</html>
- htmlparser.js:255 HTMLParser.parse
[ji-oh--react]/[html-minifier-terser]/src/htmlparser.js:255:15
- task_queues:95 process.processTicksAndRejections
node:internal/process/task_queues:95:5
- htmlminifier.js:1282 async minify
[ji-oh--react]/[html-minifier-terser]/src/htmlminifier.js:1282:3
- htmlminifier.js:1365 async exports.minify
[ji-oh--react]/[html-minifier-terser]/src/htmlminifier.js:1365:16
error Command failed with exit code 1.
似乎这个错误是由我的文件上的某些内容引起的:index.html
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://use.fontawesome.com/1ba47d38a3.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/regular.min.css"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<title>React App</title>
</head>
<body>
<div id="root"></div>
<div id="overlay"></div>
<div id="animation"></div>
</body>
</html>
`
答: 暂无答案
评论