Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx: Failed to decode param '/%PUBLIC_URL%/favicon.ico' #361

Open
andys8 opened this issue Jul 21, 2019 · 0 comments
Open

npx: Failed to decode param '/%PUBLIC_URL%/favicon.ico' #361

andys8 opened this issue Jul 21, 2019 · 0 comments

Comments

@andys8
Copy link
Contributor

andys8 commented Jul 21, 2019

Is this a bug report?

Yes. When trying to use create-elm-app with npx, it failed with url resolution for string replacement of favicon and manifest.

URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
    at decodeURIComponent (<anonymous>)
    at decode_param (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:172:12)
    at Layer.match (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:123:27)
    at matchLayer (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:574:18)
    at next (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:220:15)
    at expressInit (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:317:13)
    at /home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:335:12)
    at next (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:275:10)
    at query (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/middleware/query.js:45:5)
    at Layer.handle [as handle_request] (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:317:13)
    at /home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:335:12)
URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'
    at decodeURIComponent (<anonymous>)
    at decode_param (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:172:12)
    at Layer.match (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:123:27)
    at matchLayer (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:574:18)
    at next (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:220:15)
    at expressInit (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:317:13)
    at /home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:335:12)
    at next (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:275:10)
    at query (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/middleware/query.js:45:5)
    at Layer.handle [as handle_request] (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:317:13)
    at /home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/as/.npm/_npx/22659/lib/node_modules/elm-app/node_modules/express/lib/router/index.js:335:12)

Environment

  1. node -v: v11.14.0
  2. npm -v: 6.10.1
  3. yarn --version (if you use Yarn):
  4. npm ls create-elm-app -g (if you haven’t ejected): empty (using npx)

Then, specify:

  1. Operating system: Ubuntu 18.04
  2. Browser and version (if relevant): Not relevant

I'm also using a node package manager called fnm (1.12.0). The behavior does not occur when create-elm-app is installed globally, instead of npx. That's why I would think it's related to npx, but I wanted to mention this.

Steps to Reproduce

  1. npx create-elm-app@latest test-project
  2. cd test-project
  3. npx elm-app@latest start

Expected Behavior

It's starting the application without errors/warnings

Actual Behavior

It's starting, but there are issues shown in the console. The issues are related to string replacement.

What else to say

I think this could be specific to npx and maybe there is no way to solve it. But maybe there is? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant