Hello, I’d like to play with the dataview API on external dev env, but right from the start there appears to be a problem with the installation.
I did npm install -D obsidian-dataview.
But a simple code like
import { getAPI } from “obsidian-dataview”;
console.log(“test”)
I get the error Error: Cannot find module 'obsidian'. However, the module seems to be installed.
If you’re working on a plugin, ensure that you have the Obsidian Plugin API set up correctly. Sometimes, the obsidian module is available only in the actual Obsidian environment, rather than a standalone Node.js project.
This is a copy/paste from my checklist … hope helps!