Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Exclamation mark in favicons property value makes the build crash #162

Open
mikroware opened this issue Mar 4, 2019 · 3 comments
Open
Labels
bug Something isn't working

Comments

@mikroware
Copy link

Using something like this configuration below makes the build crash.

new WebAppWebpackPlugin({
    logo: 'image.png',
    favicons: {
        appName: 'Application!',
    },
});

Part of the error:

Error: Can't resolve '","developerName":null,"appDescription":"Description","version":"0.0.1"},"path":"/"}' in 'F:\IdeaProjects\Project\client'

....

using description file: F:\IdeaProjects\Project\package.json (relative path: ./node_modules/","developerName":null,"appDescription":"Description","version":"0.0.1"},"path":"/"})
            no extension
              F:\IdeaProjects\Project\node_modules\","developerName":null,"appDescription":"Description","version":"0.0.1"},"path":"\"} doesn't exist

Somehow the exclamation mark triggers a file path search within the itgalaxy/favicons package. Using this package directly does not give the error. Seems like the configuration is passed as a JSON string or something and somehow the favicons package cannot handle that. This also bugs on the appDescription property, so it seems to be unrelated to which property it is put on.

@brunocodutra
Copy link
Owner

Thanks for reporting, I'll investigate where exactly it's failing.
My guess is that ! has special meaning when it's part of a file path, could that be?

@mikroware
Copy link
Author

My guess is that the ! triggers some kind of file path resolve system. I am however not sure where it is. Since the ! is in the appName property, it is not directly a file path. But since it seems to be parsed as JSON before passing to the favicons packages, some sub system might think it should resolve something in the JSON as it is a string.

I hope I explained my view on it clear enough. When I have time I might be able to investigate the source of this bug.

@brunocodutra
Copy link
Owner

I hope I explained my view on it clear enough.

Yes, thank you.

@brunocodutra brunocodutra added the bug Something isn't working label Apr 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants