Sha256: d00d5f202ad3538aac10bd2058eb913b5739f8ec6bb377666269e71f03a7c5d1
Contents?: true
Size: 925 Bytes
Versions: 9
Compression:
Stored size: 925 Bytes
Contents
# frozen_string_literal: true module SewingKit module Webpack # Raised if the node sewing-kit isn't installed/runnable. class NodeSewingKitNotRunnable < StandardError def initialize(mode, cause = nil) env_message = if 'development' == mode "Try `yarn add @shopify/sewing-kit`" else "\nIf this is a container build, try:\n" \ " - Adding #{highlight('https://github.com/heroku/heroku-buildpack-nodejs')} to your " \ "#{highlight('.buildpacks')} file\n" \ " - Adding #{highlight('YARN_PRODUCTION=false')} to your pipeline's environment variables\n" \ end super( "sewing-kit is not runnable.\n" \ "#{env_message}\n" + (cause ? "Original error #{cause}" : '') ) end def highlight(message) "\u001b[1m\u001b[37m#{message}\u001b[39m\u001b[22m" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems