Skip to content

Commit e6ea48a

Browse files
Laurie BarthLaurie Barth
authored andcommitted
Change local error to a warn for now, may want to do something different later
1 parent d3c21b7 commit e6ea48a

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

packages/gatsby-plugin-theme-ui/gatsby-node.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,13 @@ exports.onPreInit = (__, options) => {
55
try {
66
options.preset = require(preset)
77
} catch {
8-
reporter.error(
9-
`It appears your theme dependency is not installed. Try running \`${generateInstallInstructions()} ${themeModule}\``
8+
reporter.warn(
9+
`It appears your theme dependency is not installed. Only local styles will appear.`
1010
)
1111
}
1212
}
1313
}
1414

15-
function generateInstallInstructions() {
16-
const { getConfigStore } = require(`gatsby-core-utils`)
17-
18-
const packageMangerConfigKey = `cli.packageManager`
19-
const PACKAGE_MANGER = getConfigStore().get(packageMangerConfigKey) || `yarn`
20-
21-
const installKeyWord = PACKAGE_MANGER === `yarn` ? 'add' : 'install'
22-
23-
return `${PACKAGE_MANGER} ${installKeyWord}`
24-
}
25-
2615
exports.createSchemaCustomization = ({ actions }) => {
2716
const { createTypes } = actions
2817

packages/gatsby-plugin-theme-ui/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"license": "MIT",
77
"peerDependencies": {
88
"gatsby": "^2.13.1",
9-
"theme-ui": "^0.3.0",
10-
"gatsby-core-utils": "^1.2.0"
9+
"theme-ui": "^0.3.0"
1110
},
1211
"keywords": [
1312
"gatsby",

0 commit comments

Comments
 (0)