gatsby-plugin-resolve-src | Gatsby plugin to allow resolving imports | Frontend Framework library
kandi X-RAY | gatsby-plugin-resolve-src Summary
kandi X-RAY | gatsby-plugin-resolve-src Summary
Gatsby plugin to allow resolving imports from the src subdirectory
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gatsby-plugin-resolve-src
gatsby-plugin-resolve-src Key Features
gatsby-plugin-resolve-src Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-plugin-resolve-src
QUESTION
I'm trying to add a featured image on my Gatsby blog but can't make it work. I tried several things found here and there but I just keep having this error message : Field "featuredImage" must not have a selection since type "String" has no subfields.
Here is my blog structure :
...ANSWER
Answered 2020-Oct-22 at 06:28The issue usually comes from multiple sources:
- When there are differences in the naming of the strings paths (images in your case). For example, if you are looking for:
../../images/house.jpeg
but the image is placed or namedhouse.jpg
(notjpeg
). Being relative paths, I assume that the issue comes from there. Try changing it to something like./path/to/image.jpg
- Check spelling
- Check plugins order
- Use GraphQL playground (
localhost:8000/___graphql
) to check the correct paths of the images by creating a specific query there.
References/useful resources:
- https://github.com/gatsbyjs/gatsby/issues/13322
- https://github.com/gatsbyjs/gatsby/issues/4123
- https://dev.to/stephencweiss/error-field-image-must-not-have-a-selection-since-type-string-has-no-subfields-3a76
- https://spectrum.chat/gatsby-js/general/this-error-field-img-must-not-have-a-selection-since-type-string~05669aa2-8045-4875-a82b-c52e53df791e
QUESTION
I'm setting up a Gatsby Project with gatsby-plugin-sass
.
my gatsby-config.js
file:
ANSWER
Answered 2020-Mar-30 at 00:10Alternative Sass Implementations - gatsby-plugin-sassOnly Dart Sass currently supports loading built-in modules with @use. Users of other implementations must call functions using their global names instead.
By default the node implementation of Sass (node-sass) is used. To use the implementation written in Dart (dart-sass), you can install sass instead of node-sass and pass it into the options as the implementation:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-plugin-resolve-src
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page