Can @grafana/ui be used without Grafana?

Hello. I’ve recently tried to use @grafana/ui npm package in my React application but when I try to compile, it gives me a lot of errors like this:

WARNING in ./node_modules/@grafana/ui/index.development.js 69373:12-29
Module not found: Error: Can't resolve './_ctx' in 'node_modules/@grafana/ui'

WARNING in ./node_modules/@grafana/ui/index.development.js 69373:45-72
Module not found: Error: Can't resolve './_object-gopd' in 'node_modules/@grafana/ui'

WARNING in ./node_modules/@grafana/ui/index.development.js 70997:16-34
Module not found: Error: Can't resolve 'indexof' in '/node_modules/@grafana/ui'

ERROR in ./node_modules/@grafana/data/index.development.js 11:17-34
Module not found: Error: Can't resolve 'stream' in 'node_modules/@grafana/data'

Can this module be used as a standalone react library, or it can be used only to build grafana plugins?

that’s not recommended. See this post for a more detailed answer: