URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
今天搭建antd的项目结构,本来项目是一个基础react项目,结果执行
yarn create umi
yarn
yarn start
项目启动后访问突然报错URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico',搜索资料才知道,搭建node项目不能在一个项目上重新搭建,会出现统一库的多版本冲突,类似java冲的jar包冲突。
这类错误最主要的就是安装了错误版本的 plugin 或 npm 包,对于项目原本的配置中在 package.json 文件中已经列出的 plugin 和 npm 包,不要再重复进行安装,否则可能重新安装的 plugin 或 npm 包版本是不适用的,从而造成出错。
例如,CRA v2.1.1 脚手架项目原有的 html-webpack-plugin 版本是 v4.0.0-alpha.2,是不需要再另外进行安装的。如果此时开发人员自己执行了 yarn add html-webpack-plugin
,从而将 html-webpack-plugin 的版本更换为了 v3.2.0,这就会造成构建报错:URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'
,其他主观错误类似。
1,html-webpack-plugin 版本错误
URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'
错误描述:在执行 yarn start
构建命令时报错,页面空白。
解决方法:html-webpack-plugin 版本错误,在本文的配置方案中,应当使用 "html-webpack-plugin": "4.0.0-alpha.2",
版本。
2,TypeError: Cannot read property 'state' of undefined(页面报错)
错误描述:编译构建过程没有报错,但页面报错:TypeError: Cannot read property 'state' of undefined。
解决方法:redux 版本错误,在本文的配置方案中,应当使用 redux <=3.7.2 版本。
相关文章
- Procedure execution failed 2013 - Lost connection to MySQL server during query
- Always Encryption: Failed to decrypt a column encryption key using key store provider: 'MSSQL_CERTIFICATE_STORE'
- win2008server R2 x64 部署.net core到IIS上出现【Failed to load the dll from [C:Program Filesdotnethostfxr1.0.1hostfxr.dll], HRESULT: 0x80070057】错误
- Failed to connect to github.com port 443: Timed out
- CentOS系统启动报错Failed to mount /sysroot解决方法
- Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd'问题解决方法
- 编译内核时报错./include/net/sch_generic.h:535:28: error: inlining failed in call to always_inline 'qdisc_pkt_len': indirect function call with a yet undetermined callee static inline unsigned int qdisc_pkt_
- Android ADB server didn't ACK * failed to start daemon * 简单有效的解决方案
- Failed to load property source from location 'classpath:/application-db.yml'
- Ubuntu “Failed to fetch”错误的解决方法
- Failed to get D-Bus connection: Operation not permitted解决
- kubelet: error: failed to run Kubelet: cannot create certificate signing request: Unauthorized
- tidb集群某个节点报错之:node_exporter-9100.service failed
- Java学习-068-Springboot 解决 maven 资源过滤导致的网页按钮图标显示异常( Failed to decode downloaded font )
- 使用Git克隆时出现错误 Failed to connect to github.com port 443 after 2076 ms: Connection refused如何解决
- 【转载】failed to open /dev/dri/renderd128 permission denied
- 【转】Windows2012设置文件夹权限报错:failed to enumerate objects in the container.
- The cast to value type 'System.Decimal' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.
- Failed to set version to docker-desktop: exit code: -1
- 王立平--Failed to pull selection
- DEBUG : Eclipse Debug 时出现 Cannot connect to VM select failed错误
- Eclipse无法打开“Failed to load the JNI shared library”
- 【AD】Altium designer画pcb时出现Unknown Pin 和Failed to add class
- spring boot Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
- Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class
- Job for httpd.service failed because the control process exited with error code.
- 码云,git push后出现错误 error:failed to push some refs to 'xxxxx‘
- js请求路径控制台报错 Failed to launch ‘xxx‘ because the scheme does not have a registered handler.
- ComposerDownloaderTransportException ... Failed to enable crypto,failed to open stream: operation failed