Comments (6)
@dkozar have you made any changes to the data source?
I tested with the latest version of the grafana-starter-datasource and yarn build
worked fine. This is my package.json - it does not have the dependencies section that you have:
{
"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",
"start": "yarn watch"
},
"author": "Grafana Labs",
"license": "Apache-2.0",
"devDependencies": {
"@grafana/data": "latest",
"@grafana/toolkit": "latest",
"@grafana/ui": "latest",
"@types/lodash": "latest",
"@testing-library/jest-dom": "5.4.0",
"@testing-library/react": "^10.0.2"
},
"engines": {
"node": ">=14"
}
}
from grafana-starter-datasource.
Usually this error would occur for minified code if an @ngInject
annotation was missing for an Angular constructor. Example of a constructor: https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/postgres/query_ctrl.ts#L42
/** @ngInject */ constructor( $scope: any, $injector: auto.IInjectorService, private templateSrv: TemplateSrv, private uiSegmentSrv: any ) {
But the starter data source doesn't have any Angular constructors so it must be a dependency that is causing this.
Have you tried removing the node modules and doing a yarn install --pure-lockfile
?
from grafana-starter-datasource.
Hi, @daniellee.
I tried both approaches, and it didn't help.
yarn install for some reason didn't work for me ("Couldn't find package "tslib" on the "npm" registry"), but I did npm install
without package-lock.json
and it's still the same.
As for the Angular - no Angular here, our plugin is a pure React plugin.
Here's the error message:
FooBar Datasource plugin failed
Error: [$injector:unpr] Unknown provider: tProvider <- t https://errors.angularjs.org/1.8.2/$injector/unpr?p0=tProvider%20%3C-%20t
There's nothing more specific in the console.
from grafana-starter-datasource.
@dkozar can we book a session to have a look at this? I can't recreate this bug.
Which OS (Windows 10?) are you running on and which version of Node/npm?
from grafana-starter-datasource.
@dkozar did you get this resolved?
from grafana-starter-datasource.
No, that was never resolved. I was not able to figure out what causes it, since there is this "disconnect" between our plugin and Grafana, which hosts the plugin. I there a way to make Grafana print out more about the error to browser console?
from grafana-starter-datasource.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-starter-datasource.