Comments (2)
@mwiehler many thanks for reporting this issue. I can see from the error messages you're using Windows with PNPM. Is this correct?
Please note this project is setup for using NPM as the package manager. If you use NPM instead of PNPM you shouldn't have any of these issues.
However if you are keen to continue with PNPM I think I managed to reproduce the error you're having. The issue is due to the way PNPM hoists and symlinks packages. In this case it's specifically the @types
packages which are causing the issue. To solve it we need to make use of the .npmrc
file to tell PNPM what to hoist into the root node_modules directory. You can find further information about this in their docs here.
Please could you copy the following into a .npmrc
file in the root of the plugin project (where the package.json file is).
# This file is required for PNPM
# PNPM 8 changed the default resolution mode to "lowest-direct" which is not how we expect resolutions to work
resolution-mode="highest"
# Make sure the default patterns are still included (https://pnpm.io/npmrc#public-hoist-pattern)
public-hoist-pattern[]="*eslint*"
public-hoist-pattern[]="*prettier*"
# Hoist all types packages to the root for better TS support
public-hoist-pattern[]="@types/*"
# @grafana/e2e expects cypress to exist in the root of the node_modules directory
public-hoist-pattern[]="*cypress*"
Once done run pnpm install
again. If the previous .npmrc
step was followed you should see a message like:
โ The modules directory at "/Users/bob/dev/sandbox/datasource-http-backend/node_modules" will be removed and reinstalled from scratch. Proceed? (Y/n) ยท true
Recreating /Users/bob/dev/sandbox/datasource-http-backend/node_modules
Make sure to select true
and let pnpm do its thing. Once the install is complete try running pnpm run build
again. It should now work. Happy plugin dev'ing! ๐
from grafana-plugin-examples.
Thank you so much! This worked!
from grafana-plugin-examples.
Related Issues (20)
- docs: move run instructions to main repo readme
- Not able to build the plugins on Windows HOT 4
- app plugin as middleware or auth HOT 1
- Switch to secureJsonFields for `app-with-backend` example (reference)
- examples use Theme (old)
- Update node.js version to 20
- Update backend examples in regards to contextual logging HOT 1
- Add example how to use adhoc features with React in datasource HOT 6
- Chore: Provide contribution guidelines
- app-with-backend run err HOT 2
- How can Grafana allow Editor to view loaded app plugins HOT 3
- Chore: Update package manager in readme for the examples
- Chore: Migrate E2E tests to grafana/plugin-e2e HOT 1
- update ui extensions context
- Examples: Update app-with-service-account to get config from request context
- Docs: Consider consolidating installation info in root README
- Update grafana/ui to 10.3.1 for all plugins examples
- datasource-http "Plugin not found, no installed plugin with that id" HOT 2
- Include docker-compose files into script which updates grafana versions HOT 1
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-plugin-examples.