Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

Error: [$injector:unpr] Unknown provider #13

Description

@dkozar

Hi,

I'm running Grafana 7.4.2 locally.

I've built a data source plugin using grafana-starter-datasource. I pointed Grafana to its dist folder.

Grafana's defaults.ini:

# Directory where grafana will automatically scan and look for plugins
plugins = C:\src\grafana-starter-datasource\dist

When I run yarn watch, everything works fine.

However, when I run yarn build (in order to build a plugin to install to remote Grafana server), my data source stops working:

FooBar Datasource plugin failed
Error: [$injector:unpr] Unknown provider: tProvider <- t http://errors.angularjs.org/1.6.9/$injector/unpr?p0=tProvider%20%3C-%20t

image

This seems to be because of minification.

Unminified (208 KB), result of yarn watch - works:

image

Minified (39 KB), result of yarn build - doesn't work:

image

I noticed this happening only recently.

My dependencies (package.json):

{
  "name": "simple-datasource",
  "version": "1.0.0",
  "description": "Grafana Data Source Plugin Template",
  "scripts": {
    "build": "grafana-toolkit plugin:build",
    "test": "grafana-toolkit plugin:test",
    "dev": "grafana-toolkit plugin:dev",
    "watch": "grafana-toolkit plugin:dev --watch",
    "sign": "grafana-toolkit plugin:sign"
  },
  "author": "Grafana Labs",
  "license": "Apache-2.0",
  "devDependencies": {
    "@grafana/data": "7.4.2",
    "@grafana/runtime": "7.4.2",
    "@grafana/toolkit": "7.4.2",
    "@grafana/ui": "7.4.2",
    "@testing-library/jest-dom": "5.4.0",
    "@testing-library/react": "^10.0.2",
    "@types/lodash": "latest",
  },
  "dependencies": {
    "grafana": "^1.0.1"
  }
  "engines": {
    "node": ">=14"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions