Tag: grafana

为什么这个WebStormconfiguration不允许我在节点应用程序中创build断点?

我试图debugging一个应用程序,它有一个后端和一个node.js前端。 我只用一个简单的bra run后端,它发出: NFO[12-08|11:57:59] Initializing HTTP Server logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket= 然后我尝试在WebStorm中运行一个debugging会话,使用以下npmconfiguration: 当我开始debugging会话时输出以下内容: /usr/local/bin/node –inspect-brk /usr/local/lib/node_modules/npm/bin/npm-cli.js run watch –scripts-prepend-node-path=auto To debug the "watch" script, make sure the $NODE_DEBUG_OPTION string is specified as the first argument for the node command you'd like to debug. For example: "scripts": { "start": "node $NODE_DEBUG_OPTION server.js" } Debugger listening […]

如何在grafana数据源插件中使用外部库

我如何在grafana数据源插件中使用外部库? 我的插件工程,但是当我需要我已经安装并保存到package.json文件的“mqtt”库我得到以下错误: 插件错误错误从http:// localhost:3000 / public / plugins / myfirstplug / datasource.js加载http:// localhost:3000 / public / mqtt为“mqtt” this is what my datasource.js head looks like: define([ 'mqtt' 'angular', 'lodash', '../core_module', 'app/core/config', ], function (mqtt,angular, _, coreModule, config) { 'use strict'; 正如我所说的package.json已经包括mqtt作为依赖项,而我也把mqtt文件夹放在几乎每个可以用作库文件夹的文件夹中。 我如何在grafana数据源插件中使用npm库,以便它可以工作? 提前致谢!

npm安装不会创builddist文件夹

我正在关注这个教程链接来创build一个grafana插件。 但是,当我从教程复制代码链接到我的testing服务器(没有dist文件夹),并运行npm install npm不会创build一个新的dist文件夹,而是创build一个node_modules文件夹。 我在这里错过了一个步骤还是我理解错误的东西? 因为我期望这个命令创build一个dist文件夹在src文件夹中的文件之外? 咕噜文件: module.exports = (grunt) => { require('load-grunt-tasks')(grunt); grunt.loadNpmTasks('grunt-execute'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.initConfig({ clean: ['dist'], copy: { src_to_dist: { cwd: 'src', expand: true, src: ['**/*', '!**/*.js', '!**/*.scss'], dest: 'dist' }, pluginDef: { expand: true, src: [ 'plugin.json', 'README.md' ], dest: 'dist', } }, watch: { rebuild_all: { files: ['src/**/*', 'plugin.json'], tasks: ['default'], […]