Gatsby Plugin Manifest lacking clarity -> causing error
See original GitHub issueSummary
The gatsby-manifest-plugin documentation for generating icons is unclear.
icon: `src/images/favion.svg`, // This path is relative to the root of the site.
icons: [
{
src: `src/images/favicon--short.svg`,
sizes: `192x192`,
type: `image/png`,
},
],
I have added the above code to the gatsby-config.js
. However when running gatsby develop
or gatsby build
the terminal throws the following error.
error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
ENOENT: no such file or directory, mkdir 'public/src/images'
303 |
304 | if (!exists) {
> 305 | fs.mkdirSync(iconPath);
| ^
306 | }
307 |
308 | paths[iconPath] = true;
Error: ENOENT: no such file or directory, mkdir 'public/src/images'
The documentation has the favicons in a folder called favicons. The error implies these icon files should be inside the public folder. But this seems incorrect.
Any advice would be helpful, thankyou.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Troubleshooting Common Errors - Gatsby
Errors using gatsby-plugin-image and sharp. Gatsby's image processing is broken up into different packages which need to work together to source images and ......
Read more >Gatsby Changelog | 5.3.0
In PR #36623 we fixed this behavior and any node changes (either by changing local files or through webhook updates) will be reflected...
Read more >How to install Clarity on Gatsby? - Microsoft Learn
From the Clarity dashboard, go to Settings. · From the left menu, click Setup. · Under Installation methods, select Install on third-party ...
Read more >Why gatsby-plugin-manifest cannot resolve 'gatsby'?
Can you try deleting your node_modules folder, and install again? And yeah, it does need to be installed locally as well. But npm...
Read more >apolllo graphql variable of type x was not provided - You.com
gatsby develop run without these errors - the $id is provided. ... 61.0.2 Safari: 11.1.2 npmPackages: gatsby: next => 2.0.0-rc.10 gatsby-plugin-manifest: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
icon
option should point to a file relative to the root of your site inside thesrc
folder.The icons defined in the
icons
option however reference icons that will eventually be in thepublic
folder. One puts these files there by placing them inside the static folder.Example:
The documentation/README at https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/README.md should include a note that
icons
is referring to the final URL and thus images need to be added tostatic
.icons: [ { src:
src/images/favion.svg
, sizes:192x192
, type:image/png
, },