二次开发 Grafana

3,167 阅读1分钟
  1. 下载grafana。
    1. 通过git克隆到本地开发环境
    2. 创建一个分支并切换到需要的版本
    3. 根据官方的安装步骤进行安装
    4. 可以在yarn install --pure-lockfile之后进行npm run build然后启动grafana:./bin/xxxxx/xxx-server
  2. 报错处理
    1. go run build.go setup 时报错:go的开发路径配置不正确
    2. npm run build 报错:

      报错信息:Module build failed: ModuleBuildError: Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version.
      需要安装node-sass
    3. npm run watch 报错:

      报错信息:This usually happens because your environment has changed since running 'npm install' .
      需要执行:npm rebuild node-sass命令
    4. 在打包时发生错误:exec: "fpm": executable file not found in $PATH 

      yum install ruby-devel gcc make rpm-build rubygems
      gem install --no-ri --no-rdoc fpm
      fpm --version
      

  3. 待续。。。