Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to load plugin #1

Open
cristianmtr opened this issue Jun 16, 2022 · 7 comments
Open

failed to load plugin #1

cristianmtr opened this issue Jun 16, 2022 · 7 comments

Comments

@cristianmtr
Copy link

Hello,

I am trying to use this plugin. However, when I try to activate I get an error "Failed to load plugin" and it doesn't activate.

0.14.15 on Ubuntu

@hgrw
Copy link

hgrw commented Jun 18, 2022

Not sure if its the official way to do it but I got it to work by installing with npm.

npm run build. If main.js is generated, it will work. You'll have to install typescript too.

@gpQ4utjefs
Copy link

Hello,

I am trying to use this plugin. However, when I try to activate I get an error "Failed to load plugin" and it doesn't activate.

0.14.15 on Ubuntu

Same problem

@dwrolvink
Copy link
Contributor

Not sure if its the official way to do it but I got it to work by installing with npm.

npm run build. If main.js is generated, it will work. You'll have to install typescript too.

Yes this is a step that I use when developing it, I assumed that once the main.js is generated this would not be necessary.

@cristianmtr apologies for the late reaction, I don't seem to get emails for this project for some reason.
Does the npm run build work for you? This is really still in alpha mode related to this item, I can look this weekend whether I can get it to work without any npm dependencies.

@sa-aguilarv
Copy link

sa-aguilarv commented Oct 19, 2022

Hello,

I am trying to use this plugin. However, when I try to activate I get an error "Failed to load plugin" and it doesn't activate.

0.14.15 on Ubuntu

Hey! I'm having the same problem. I tried to solve it by:

  1. Installing npm: sudo apt install npm source
  2. Installing typescript:
    curl -fsSL https://deb.nodesource.com/setup_15.x | sudo -E bash -
    sudo apt-get install -y nodejs
    sudo npm install -g typescript
    tsc
    source

After that, I did the npm run build and among the errors (see errors1.txt) it said to do npm i --save-dev @types/node which I was unable to install until I did:

  1. cd to get out of the obs-html directory
  2. sudo npm i --save-dev @types/node

Once again I got multiple errors when I tried to install the plugin with npm (see errors2.txt). I realized there were a lot of missing modules/properties/... so I did the following:

  1. npm i obsidian source
  2. npm i require source
  3. npm i tslib source

Here I stopped because I might be getting this all wrong. I don't have experience with npm, so I would be grateful if someone could help me out.

Thank you in advance for reading my message.

errors1.txt
errors2.txt

@dwrolvink
Copy link
Contributor

dwrolvink commented Oct 19, 2022

All that I did, to install and use the plugin is this:

npm i          # to install dependencies
npm run dev    # to start compilation in watch mode

See also https://github.com/obsidianmd/obsidian-sample-plugin#how-to-use

Though after compiling I can just reboot my pc and have the plugin work, so I thought the plugin should just work as-is, when the main.js is created, but this is apparently not the case...

Will have to look into this further, I'm not a nodejs guru.

@sa-aguilarv
Copy link

All that I did, to install and use the plugin is this:

npm i          # to install dependencies
npm run dev    # to start compilation in watch mode

See also https://github.com/obsidianmd/obsidian-sample-plugin#how-to-use

Though after compiling I can just reboot my pc and have the plugin work, so I thought the plugin should just work as-is, when the main.js is created, but this is apparently not the case...

Will have to look into this further, I'm not a nodejs guru.

I'm sorry, I just found the error. I was running everything on my HDD instead of my SSD. I normally work with virtual environments in the HDD so it took me a while to notice. Once I gave it a try and did what you mentioned, it worked. Thank you again for helping me out!

@welpdx
Copy link

welpdx commented Dec 7, 2022

to anyone who had this error when trying to get dataview working for obsidian-html:

this is what worked for me:

cd /path/to/vault/.obsidian/plugin/
git clone https://github.com/obsidian-html/obs.html
cd obs.html
sudo apt install npm
sudo apt install -y nodejs
sudo npm install -g typescript
npm i
npm run dev

in obsidian:
now reload plugins
enable plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants