question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebPackError: ENOENT: no such file or directory /public/.iconstats.json'

See original GitHub issue

I’ve just installed the gatsby-plugin-favicon but I get this WebpackError: ENOENT: no such file or directory, open '/home/daniel/Projects/personal_blog/public/.iconstats.json' error when I try to build the project?

module.exports = {
	plugins: [
		{
			resolve: `gatsby-plugin-favicon`,
			options: {
				logo: "./src/images/rev4_cropped.png",

				// WebApp Manifest Configuration
				appName: 'Gatsby site',
				appDescription: null,
				developerName: null,
				developerURL: null,
				dir: 'auto',
				lang: 'en-US',
				background: '#fff',
				theme_color: '#fff',
				display: 'standalone',
				orientation: 'any',
				start_url: '/',
				version: '1.0',

				icons: {
					android: true,
					appleIcon: true,
					appleStartup: true,
					coast: false,
					favicons: true,
					firefox: true,
					opengraph: false,
					twitter: false,
					yandex: false,
					windows: false
				}
			}
		},
		'gatsby-plugin-robots-txt',
		'gatsby-remark-copy-linked-files',
		'gatsby-transformer-sharp',
		'gatsby-plugin-sharp',
		'gatsby-plugin-styled-components',
		{
			resolve: 'gatsby-transformer-remark',
			options: {
				plugins: [
					'gatsby-remark-katex',
					{
						resolve: 'gatsby-remark-images',
						options: {
							maxWidth: 1080 
						}
					},
					{
						resolve: 'gatsby-remark-prismjs',
						options: {
							// Class prefix for <pre> tags containing syntax highlighting;
							// defaults to 'language-' (eg <pre class="language-js">).
							// If your site loads Prism into the browser at runtime,
							// (eg for use with libraries like react-live),
							// you may use this to prevent Prism from re-processing syntax.
							// This is an uncommon use-case though;
							// If you're unsure, it's best to use the default value.
							classPrefix: "language-",
							// This is used to allow setting a language for inline code
							// (i.e. single backticks) by creating a separator.
							// This separator is a string and will do no white-space
							// stripping.
							// A suggested value for English speakers is the non-ascii
							// character '›'.
							inlineCodeMarker: null,
							// This lets you set up language aliases.  For example,
							// setting this to '{ sh: "bash" }' will let you use
							// the language "sh" which will highlight using the
							// bash highlighter.
							aliases: {sh: "bash"},
						}
					}
				]
			}
		},
		'gatsby-plugin-react-helmet',
		'gatsby-plugin-sass',
		{
			resolve: 'gatsby-source-filesystem',
			options: {
				path: `${__dirname}/src/pages`,
				name: 'pages'
			}
		},
		{
			resolve: 'gatsby-source-filesystem',
			options: {
				path: `${__dirname}/src/images`,
				name: 'images'
			}
		},
		{
			resolve: 'gatsby-plugin-eslint',
			options: {
				test: /\.js$|\.jsx$/,
				exclude: /(node_modules|cache|public)/,
				options: {
					emitWarning: true,
					failOnError: false
				}
			}
		},
		{
			resolve: `gatsby-plugin-google-analytics`,
			options: {
				trackingId: "UA-xxxxxxxxxxxxxxxxx-2",
				// Puts tracking script in the head instead of the body
				head: true,
				// Setting this parameter is optional
				anonymize: true,
				// Setting this parameter is also optional
				respectDNT: true,
				// Avoids sending pageview hits from custom paths
				exclude: ["/preview/**", "/do-not-track/me/too/"],
			},
		},
		{
			resolve: 'gatsby-plugin-sitemap'
		},
	],

	siteMetadata: {
		author: 'xxxxxxxxxxxxxxxxx',
		title: 'xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx',
		name:"google-site-verification",
		content:"Ji_Q-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxx",
		siteUrl: "https://xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxx"
	},
	// pathPrefix: '/personal_blog'
};

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
julien1619commented, Jul 29, 2018

Are you using Gatsby v2? The last major version of this plugin is only compatible with Gatsby v2.

1reaction
rperez2021commented, Jul 30, 2018

Had the same issue, looked at some other Gatsby Projects I had and I went back to 2.1.1 which doesn’t have that issue. @julien1619 Do you know which version was the last one for the current (not V2) version of Gatsby?

Read more comments on GitHub >

github_iconTop Results From Across the Web

So i try to add gatsby-plugin-favicon in my gatsby-config.js file
WebpackError : ENOENT: no such file or directory, open 'C:\Users\setia\myrep ository\GatsbyJS\gatsby_crash_course\public\.iconstats.json'.
Read more >
Gatsby site deployment failure - No such file or directory
Hey folks, I have a Gatsby blog deployed to Netlify. My deployments were running successfully until today, when the deployment failed for some...
Read more >
no such file or directory, open \package.json install bootstrap ...
Solved: npm WARN saveError ENOENT : no such file or directory, ... into the new app folder code at: https://codedocu.com/Details?d=2813&a...
Read more >
gatsby-plugin-tidy
Error: ENOENT: no such file or directory, open '…\public\page-data\ index\page-data.json' | delete the .cache directory and retry · Blank page using gatsby ...
Read more >
Error no such file or directory, open '/home/vcap/app/package ...
Hello Everyone, I am getting below mentioned error while trying to deploy the services on Cloud Foundry enoent ENOENT: no such file or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found