Closed bscott closed 3 years ago
When cloning the repository instead of installing it through the regular plugin screen in Obsidian you'll need to build the plugin with either yarn build
or npm run build
. This will generate a main.js file allows you to use it :)
I will add that to the README.md as I've seen other people experiencing the same :)
Thank you
@jplattel Still having issues, ran the npm build, but was missing rollup, added that still running into issues even with npm install
❯ npm run build
> obsidian-sample-plugin@0.9.7 build /mnt/c/Users/Per/.obsidian/plugins/obsidian-query-language
> rollup --config rollup.config.js
[!] Error: Cannot find module '@rollup/plugin-typescript'
Error: Cannot find module '@rollup/plugin-typescript'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/mnt/c/Users/ /mnt/c/Users/Per/.obsidian/plugins/obsidian-query-language/rollup.config.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/rollup/dist/shared/loadConfigFile.js:513:20)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm install even with root fails, tried on MacOS & Win WSL2
It seems like you don't have https://www.npmjs.com/package/@rollup/plugin-typescript installed.
Is there a reason you're installing with this method instead of using the plugin system in Obsidian itself? :)
@jplattel I can't install via Obs itself as you stated to run npm build
first to generate the main.js, just trying to get to a place where I can enable the plugin in Obsidian. I would assume that npm install
would install any deps I needed for the build.
Your instructions stated to do it this way, I was under the impression that the plugin wasn't offered in the general list of community plugins. I'll go ahead and look in the community list again, Thanks for your help :)
Ah, right. I see where the confusion arises, sorry about that. I'll update the readme to reflect that you can just install it trough Obsidian itself! Sorry for all the hassle!
After clone the repo to
.obsidian/plugins
and reloading Obsidian v0.11.2, I get an errorFailed to load Plugin
when trying to enable it.