Create-react-app: URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'

Created on 12 Jun 2018  Â·  4Comments  Â·  Source: facebook/create-react-app

hi All,
I am new to webpack and I got the babel loader and css loader to work and project compiles successfully but when I try to access via browser I get the below error. It looks as if PUBLIC_URL is not recognized. I I believe I don't know how to configure this.

I appreciate your valuable comments.

Thaks

ℹ 「wdm」: Compiled successfully. URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico' at decodeURIComponent (<anonymous>) at decode_param (/home/mike/finance-grapher/node_modules/express/lib/router/layer.js:172:12) at Layer.match (/home/mike/finance-grapher/node_modules/express/lib/router/layer.js:123:27) at matchLayer (/home/mike/finance-grapher/node_modules/express/lib/router/index.js:574:18) at next (/home/mike/finance-grapher/node_modules/express/lib/router/index.js:220:15) at expressInit (/home/mike/finance-grapher/node_modules/express/lib/middleware/init.js:40:5) at Layer.handle [as handle_request] (/home/mike/finance-grapher/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/mike/finance-grapher/node_modules/express/lib/router/index.js:317:13) at /home/mike/finance-grapher/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/mike/finance-grapher/node_modules/express/lib/router/index.js:335:12)

Webpack.config.js
image

.babelrc
image

package.json
image

project folder structure
image

All 4 comments

I recommend you installing react with npx. use > create-react-app myproject. It works well and the configuration is optmized, improving your deployment when you make the build of your project

You might want to use react-dev-utils/InterpolateHtmlPlugin.
Example usage.

@Pedr0visk I use create-react-app. It indeed already has everything setup. I am curious how "build": "react-scripts build", does the build job? Do you have any comments? Thank you

You cannot install any additional packages like you have, please remove your modified start script, and rename start1 back to start.
Uninstall all devDependencies you have listed in the picture.

Executing npm start will boot up everything you need.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amuehl picture amuehl  Â·  79Comments

benneq picture benneq  Â·  99Comments

gabrielmicko picture gabrielmicko  Â·  70Comments

akctba picture akctba  Â·  80Comments

andreypopp picture andreypopp  Â·  96Comments