【发布时间】:2021-04-19 01:24:10
【问题描述】:
我正在尝试将 React 项目和 parcel 作为捆绑器。 我在尝试运行命令“dev”时遇到此错误:
服务器运行在 http://localhost:1234 × C:\React\parcelreact\todoapp\public\index.html: URI 格式错误
这是一个标准的 create-react-app 项目,然后添加了 parcel-bundler..
这是我的 package.json “脚本”{}
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "parcel public/index.html",
"run": "parcel build index.html"
},
C:\React\parcelreact\todoapp\public\index.html:URI 格式错误 在 decodeURIComponent()
这个错误的原因是什么? 我的 index.html 确实在我的 public/ 文件夹中..
帮助。?
【问题讨论】:
-
你有没有想过这个问题?我正在尝试做同样的事情并收到同样的错误。