You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/gatsby-cli/src/structured-errors/error-map.js
+71Lines changed: 71 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,77 @@ const errorMap = {
89
89
type: `PLUGIN`,
90
90
level: `ERROR`,
91
91
},
92
+
"11322": {
93
+
text: context=>
94
+
`${
95
+
context.pluginName
96
+
} created a page and didn't pass the path to the component.\n\nThe page object passed to createPage:\n${JSON.stringify(
97
+
context.pageObject,
98
+
null,
99
+
4
100
+
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
101
+
level: `ERROR`,
102
+
},
103
+
"11323": {
104
+
text: context=>
105
+
`${
106
+
context.pluginName
107
+
} must set the page path when creating a page.\n\nThe page object passed to createPage:\n${JSON.stringify(
108
+
context.pageObject,
109
+
null,
110
+
4
111
+
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
112
+
level: `ERROR`,
113
+
},
114
+
"11324": {
115
+
text: context=>
116
+
`${
117
+
context.message
118
+
}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
119
+
level: `ERROR`,
120
+
},
121
+
"11325": {
122
+
text: context=>
123
+
`${
124
+
context.pluginName
125
+
} created a page with a component that doesn't exist.\n\nThe path to the missing component is "${
126
+
context.component
127
+
}"\n\nThe page object passed to createPage:\n${JSON.stringify(
128
+
context.pageObject,
129
+
null,
130
+
4
131
+
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
132
+
level: `ERROR`,
133
+
},
134
+
"11326": {
135
+
text: context=>
136
+
`${
137
+
context.pluginName
138
+
} must set the absolute path to the page component when create creating a page.\n\nThe (relative) path you used for the component is "${
139
+
context.component
140
+
}"\n\nYou can convert a relative path to an absolute path by requiring the path module and calling path.resolve() e.g.\n\nconst path = require("path")\npath.resolve("${
141
+
context.component
142
+
}")\n\nThe page object passed to createPage:\n${JSON.stringify(
143
+
context.pageObject,
144
+
null,
145
+
4
146
+
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
147
+
level: `ERROR`,
148
+
},
149
+
"11327": {
150
+
text: context=>
151
+
`You have an empty file in the "src/pages" directory at "${
152
+
context.relativePath
153
+
}". Please remove it or make it a valid component`,
154
+
level: `ERROR`,
155
+
},
156
+
"11328": {
157
+
text: context=>
158
+
`A page component must export a React component for it to be valid. Please make sure this file exports a React component:\n\n${
Copy file name to clipboardExpand all lines: packages/gatsby/src/redux/__tests__/__snapshots__/pages.js.snap
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
-
exports[`Add pages Fails if component path is missing 1`] =`"The plugin \\"test\\" must set the absolute path to the page component when create creating a page"`;
3
+
exports[`Add pages Fails if component path is missing 1`] =`"A component must be set when creating a page"`;
4
4
5
5
exports[`Add pages Fails if path is missing 1`] =`"The plugin \\"test\\" must set the page path when creating a page"`;
${name} created a page with a component path that doesn't match the casing of the actual file. This may work locally, but will break on systems which are case-sensitive, e.g. most CI/CD pipelines.
${name} created a page with a component path that doesn't match the casing of the actual file. This may work locally, but will break on systems which are case-sensitive, e.g. most CI/CD pipelines.
0 commit comments