File tree 2 files changed +8
-1
lines changed
examples/using-gatsby-image
packages/gatsby-plugin-sharp/src
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ module.exports = {
2
2
plugins : [
3
3
`gatsby-plugin-emotion` ,
4
4
`gatsby-plugin-netlify` ,
5
+ `gatsby-plugin-sharp` ,
5
6
`gatsby-transformer-sharp` ,
6
7
{
7
8
resolve : `gatsby-source-filesystem` ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const getImageSize = file => {
40
40
// There is no guarantee that the module resolved is the module executing!
41
41
// This can occur in mono repos depending on how dependencies have been hoisted.
42
42
// The direct require has been left only to avoid breaking changes.
43
- let { boundActionCreators } = require ( `gatsby/dist/redux/actions` )
43
+ let boundActionCreators
44
44
exports . setBoundActionCreators = actions => {
45
45
boundActionCreators = actions
46
46
}
@@ -107,6 +107,12 @@ function prepareQueue({ file, args }) {
107
107
}
108
108
109
109
function createJob ( job , { reporter } ) {
110
+ if ( ! boundActionCreators ) {
111
+ reporter . panic (
112
+ `Gatsby-plugin-sharp wasn't setup correctly in gatsby-config.js. Make sure you add it to the plugins array.`
113
+ )
114
+ }
115
+
110
116
// Jobs can be duplicates and usually are long running tasks.
111
117
// Because of that we shouldn't use async/await and instead opt to use
112
118
// .then() /.catch() handlers, because this allows V8 to release
You can’t perform that action at this time.
0 commit comments