Zachatoo / obsidian-css-editor

Edit CSS snippets in Obsidian.
MIT License
57 stars 2 forks source link

How to recompile plugin?! #16

Closed holroy closed 6 months ago

holroy commented 6 months ago

If I try to just recompile your plugin in a fork of mine, it fails when trying to be loaded in Obsidian 1.5.12. Which steps are needed to take?

I tried doing:

app.js:1 Plugin failure: css-editor TypeError: Cannot read properties of undefined (reading 'deserialize')
    at l (app.js:1:1944740)
    at new t (app.js:1:1944962)
    at t.deserialize (app.js:1:1949264)
    at anonymous (plugin:css-editor:8450:35)
    at e.<anonymous> (app.js:1:2243790)
    at app.js:1:237056
    at Object.next (app.js:1:237161)
    at a (app.js:1:235879)

Do you have any suggestion on what I'm doing wrong?

Zachatoo commented 6 months ago

Do you also have a manifest.json file in that folder, as documented here? That file is required for a plugin to work.

Less likely, but maybe you're running an older version of node? The build works for me on the LTS version (20.12.1). Though I tried it on 16.17.0 as well and that also worked.

holroy commented 6 months ago

I'm not sure what really happened, but I fiddled around, cloned/downloaded/..., and now it seems to work as expected at least when I'm doing the npm run dev. So I guess it's all good now.