Comments (8)
If the dependency is already available on the host I think you should not do nothing. I mean they are not installed but they are available automatically. staticDependencies
are dependencies that you want to "hack" so that the host can pass something special to the plugin.
If you don't do nothing it works at runtime? Or you have some missing dependency error?
Also consider to use hostRequire=undefined
as an option to disable any transitive dependency from host to plugin.
from live-plugin-manager.
No doc for now, sorry ... but here the relevant code:
- https://github.com/davideicardi/live-plugin-manager/blob/master/src/PluginManager.ts#L26
- https://github.com/davideicardi/live-plugin-manager/blob/master/src/PluginVm.ts#L304
from live-plugin-manager.
Which is the package that cause problems? Or this happened for all packages when using your library?
from live-plugin-manager.
Maybe you can send ne the logs by calling your app wih DEBUG=* environment variable.
from live-plugin-manager.
It only has issues when being run from my cli program. I import it in another test program and it works fine.
I figured out what the issue is though. PluginManager is saying the dependencies for plugins are already available on the host. The way I am using live-plugin-manager is by reading a config file that lists plugins to install. A plugin will be a lib from my monorepo, which in turn depends on the same dependencies as my cli does. So it's always going to say the plugin is already available.
It looks like staticDependencies will solve this issue if I am not mistaken.
I will give that a try and report back.
from live-plugin-manager.
The thing is, I don't know where the cli will be installed. It could be local to a project that is running it, and the project that needs the dependency in another project. I may be mistaken, but I don't think the node module resolver would be able to find it that way.
from live-plugin-manager.
I never knew about hostRequire=undefined option. If you have a sec. Can you link me to some docs on that?
Thanks a lot for your help btw.
from live-plugin-manager.
great. I'll check it out.
Thanks again for the assistance.
from live-plugin-manager.
Related Issues (20)
- 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead. HOT 3
- 0.14.1 -> 0.15.1 issue on 0.15.1 HOT 2
- no such file or directory, mkdir '/plugin_packages' HOT 4
- getInfo should load the package from disk HOT 2
- Proxy settings for NPM registry HOT 1
- Support loading plugins without FS access HOT 1
- fix: circular dependencies result in endless loop + out of memory crash HOT 3
- Plugin manager require gives module not found but passing the path directly works HOT 4
- Plugin manager gives an error requiring aws-sdk HOT 3
- sharp lib install failed HOT 2
- Error when using require to load an ES6 module HOT 7
- PluginManager.install is not compatible with NodeJS workers HOT 1
- Literal Object prototype is not working properly inside the plugin's context HOT 9
- Module not found: Can't resolve 'console' in React HOT 2
- Error: Invalid plugin github repository HOT 2
- Improper Error handling HOT 1
- PluginVm.getScopedInfo could not get the correct scope if it contains a dot HOT 1
- Handling modules with index.json entrypoints HOT 2
- FR: Support for `"exports"` in `package.json` HOT 1
- Error: Code generation from strings disallowed for this context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from live-plugin-manager.