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
We're using Yarn workspaces, and because api-1-docs and api-2-docs share the Spectacle dependencies, they get hoisted up to the node_modules folder in project instead of landing in individual node_modules folders inside of api-1-docs and api-2-docs.
This is all fine until I try to run spectacle swagger.json. Then I get:
$ spectacle swagger.json
>> Local Npm module "grunt-contrib-concat" not found. Is it installed?
>> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
>> Local Npm module "grunt-contrib-cssmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-compile-handlebars" not found. Is it installed?
>> Local Npm module "grunt-prettify" not found. Is it installed?
>> Local Npm module "grunt-sass" not found. Is it installed?
>> Local Npm module "grunt-embed" not found. Is it installed?
Task error: [Error: Task "sass:foundation_scss" not found.
<stack trace>
It looks like this is because grunt's loadNpmTasksdoesn't resolve modules as Node would. When I check in the parent node_modules folder all of those modules are there.
But that's really messy. Is there any way to get Spectacle to resolve the grunt tasks the same way Node would so I can change the command back to spectacle swagger.json?
The text was updated successfully, but these errors were encountered:
We're trying to use spectacle in a monorepo structured like this:
We're using Yarn workspaces, and because
api-1-docs
andapi-2-docs
share the Spectacle dependencies, they get hoisted up to thenode_modules
folder inproject
instead of landing in individualnode_modules
folders inside ofapi-1-docs
andapi-2-docs
.This is all fine until I try to run
spectacle swagger.json
. Then I get:It looks like this is because grunt's
loadNpmTasks
doesn't resolve modules as Node would. When I check in the parentnode_modules
folder all of those modules are there.My workaround for the moment is:
But that's really messy. Is there any way to get Spectacle to resolve the grunt tasks the same way Node would so I can change the command back to
spectacle swagger.json
?The text was updated successfully, but these errors were encountered: