-
Notifications
You must be signed in to change notification settings - Fork 43
Monorepo failures due to thrown errors #153
Copy link
Copy link
Milestone
Description
Lines 71 to 86 in d0af3d9
| if (!options.apiKey) { | |
| throw new Error('`[@nuxtjs/algolia]` Missing `apiKey`') | |
| } | |
| if (!options.applicationId) { | |
| throw new Error('`[@nuxtjs/algolia]` Missing `applicationId`') | |
| } | |
| if (options.crawler!.apiKey || options.crawler!.indexName) { | |
| if (!options.crawler!.apiKey) { | |
| throw new Error('`[@nuxtjs/algolia]` Missing `crawler.apiKey`') | |
| } | |
| if (!options.crawler!.indexName) { | |
| throw new Error('`[@nuxtjs/algolia]` Missing `crawler.indexName`') | |
| } |
I don't think Errors should be thrown here because it will always fail sibling projects. This happens because in a monorepo the nuxt postinstall script will always run, which will throw these errors for every project except the nuxt project due to the missing env vars.
Instead of throwing here, warning should be emitted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels