lib/sewing_kit/webpack/manifest.rb in sewing_kit-0.27.1 vs lib/sewing_kit/webpack/manifest.rb in sewing_kit-0.27.2
- old
+ new
@@ -23,9 +23,32 @@
"Original error #{cause}"
)
end
end
+ class NodeSewingKitManifestMissing < StandardError
+ def initialize(mode, node_error_message)
+ env_message = if 'production' == mode
+ "\nIf this is a container build:\n" \
+ " - Verify that sewing_kit compilation succeeded before deployment\n" \
+ " - Verify that public/bundles/sewing-kit.manifest.json was uploaded\n" \
+ " - Verify that public/bundles/sewing-kit.manifest.json exists in the container\n" \
+ else
+ "\nPossible next steps:\n" \
+ " - If the server is still starting up, wait for a 'Compiled with latest changes' message" \
+ " then refresh your browser\n" \
+ " - Check the development console for compilation errors\n" \
+ " - Restart your development server\n"
+ end
+
+ super(
+ "Could not fetch the sewing-kit manifest 🙀 " \
+ "#{env_message}\n" \
+ "Original error #{node_error_message}"
+ )
+ end
+ end
+
# Raised if the node-generated manifest cannot be read from the filesystem.
class ManifestLoadError < StandardError
def initialize(path, cause)
super "Could not load manifest from #{path} (original error #{cause})"
end