You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a user script macro that uses simple-git to push changes to github. I am struggling on how to reference the simple-git dependency.
I've tried doing an npm i simple-git in the same directory as the script file, in the parent directory, in the .obsidian/modules directory. I've even tried copying the index.js file from simple-git into the same folder as my user script and doing const simpleGit = require('./simple-git')
Nothing seems to work. The error is always "cannot find module 'simple-git'"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a user script macro that uses simple-git to push changes to github. I am struggling on how to reference the simple-git dependency.
I've tried doing an
npm i simple-gitin the same directory as the script file, in the parent directory, in the.obsidian/modulesdirectory. I've even tried copying the index.js file from simple-git into the same folder as my user script and doingconst simpleGit = require('./simple-git')Nothing seems to work. The error is always "cannot find module 'simple-git'"
node:internal/modules/cjs/loader:1082 Uncaught (in promise) Error: Cannot find module 'simple-git' Require stack: - electron/js2c/renderer_initAny tricks on how to reference dependencies in user script macros?
Beta Was this translation helpful? Give feedback.
All reactions